ng:payloadToString

ng:payloadToString

The function ng:payloadToString('encoding') is to be used in workflows only.

 

It converts the payload into a string.

 

The encoding can e.g. be 'UTF-8' like in this example:

 

ng:payloadToString('utf-8')

 

A related function is ng:varToString().

 

This built-in function was added as an aid for those, that wants to call external Http(s) rest apis. If the api expects a string, then this function can be used to convert a binary payload into string. An example for how this can be used is included here.

    Notice: Help Center Transition Update

    As of January 13, 2025, we are excited to announce that our new Help Center is in the final stages of development. While the Knowledge Base is already accessible, our current JIRA system will continue to manage support tickets during this transition period. For assistance with InterForm Output Management Software, please refer to the Support for InterForm Output Management Software.

    We appreciate your patience and understanding as we work to enhance your support experience. If you have any questions or encounter any issues, please do not hesitate to reach out via the existing support channels.

    Best regards,
    The InterForm Support Team


      • Related Articles

      • ng:varToString

        The function, ng:varToString('varName','encoding') is a function, that has been added especially for use with web service. The function converts the variable, varName (which is expected to be an integer) into a string. This encodes the variable, ...
      • ng:resourceExist

        ng:resourceExist(resource,path) This function checks, if a resource in InterFormNG2 exists or not. The function returns a boolean: true or false. The ng:resourceExist Xpath function has this format: ng:resourceExist(resource,path), where: resource ...
      • ng:decrypt

        The built-in function, ng:decrypt is linked with the encryption functions: ng:encrypt and the workflow component, Set secure workflow variable. The function, ng:decrypt can decrypt contents, that was previously encrypted with these functions. The ...
      • ng:minimum

        InterFormNG2 includes the special built-in XPath function, ng:minimum. This function returns the smallest value of two numeric arguments. The function only accepts two numeric arguments - no more and no less. Examples: ng:minimum(-14,2) returns 2 ...
      • ng:base64

        The built-in function, ng:base64 converts a string (text) into a base64 based string. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed. This function is related ...