Built-in functions
ng:uuid()
The function, ng:uuid() can be used in order to generate a 128-bit universally unique identifier that complies with the Internet Engineering Task Force RFC 4122 standard. The function has no parameters and is simply called as ng:uuid(). You can e.g. ...
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:trimRight
The built-in function, ng:trimRight trims any trailing blanks from a string, which is the input for the function. Example: This expression outputs the string: ' abc': You can also see the difference, if you combine this function with the concat ...
ng:trimLeft
The built-in function, ng:trimLeft trims any leading blanks from a string, which is the input for the function. Example: This expression outputs the string: 'abc ': You can also see the difference, if you combine this function with the concat ...
ng:trim
The built-in function, ng:trim trims any leading and trailing blanks from a string, which is the input for the function. It is similar to the standard XPath function, normalize-space(), but the ng:trim() function only trims leading and trailing ...
ng:translation
This section describes the built-in function: ng:translation(resource, key, locale,fallback_value) The function can be used, if you e.g. want to create a multi-language template. The function refers to one or more translate files. Another way to use ...
ng:spoolMapRel
The built-in function, ng:spoolMapRel is only available in InterFormNG2, if you are running InterFormNG2 on the IBM i platform, or have activated the AS400 option in InterFormNG2. This function only supports spooled files loaded in the version 2 ...
ng:spoolMapCond
IMPORTANT: This function is only supported for spooled files loaded in the old format, Version 1, which is not recommended - it is not supported for spooled files loaded in version 2, which is better, default alternative to load spooled files in. ...
ng:spoolMap
The built-in function, ng:spoolMap is only available in InterFormNG2, if you are running InterFormNG2 on the IBM i platform. With this function you can map data from an input spooled file in the designer, and extract information from the spooled file ...
ng:spellOutNumber
ng:spellOutNumber(number,locale) The built-in XPath function, ng:spellOutNumber can help you to spell out a number as text. The output text is as-is and might not fit the exact way to write the amount of a text in any locale, but you can e.g. replace ...
ng:serializationData
The built-in function, ng:serializationData can help you if you want to print multiple label on a ZPL compatible printer, that are all identical apart from a number, which is increased for each label. You can use this to reduce the size of the print ...
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: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 ...
ng:page-number
This section explains the built-in XPath function: ng:page-number() This function outputs the current page number of the output. The function has no parameters. You can use this function with other functions in an XPath expression - unlike the ...
ng:numberFormat
This section describes the built-in function: ng:numberFormat(number, locale, mask, customErrorMessage) The function can be used for presenting/formatting a number as you want. Important note regarding rounding of numbers in InterFormNG2 versions ...
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:measureFont
The built-in function, ng:measureFont can be used in order to calculate the width of a text, when the font and font settings are known. It returns the width in 72 DPI (Dots Per Inch), which means that a value of e.g. 36 means a text width of 0.5 ...
ng:last-page-number
This section explains the built-in XPath function: ng:last-page-number() This function outputs the total number of pages of the output. The function has no parameters. You cannot use this function with other functions in an XPath expression (it can ...
ng:hexToUtf8
This section explains the built-in XPath function: ng:hexToUtf8(hexValue) Returns the UTF-8 characters that are specified as the hexValue input string (must be the hex codes of the characters' byte-sequence in UTF-8 encoding). For the 2D barcodes ...
ng:fileExist
ng:fileExist(path) The ng:fileExist Xpath function has this format: ng:fileExist(path), where path contains the path to a file, that should be verified. The function returns true, if the file exists and false, if the file does not exist. The function ...
ng:encrypt
The built-in function, ng:encrypt() can be used for encrypting data e.g. a password in InterFormNG2. The related workflow component, Set secure workflow variable is normally a better choice for saving passwords. The ng:encrypt function only has a ...
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:dateTimeFormat
This section desribes the built-in function, ng:dateTimeFormat(xmlDateTime, dateFormat, part, locale, customErrorMessage) The function converts an XML date and time (timestamp) into the format of your choice. An alternative to this function is ...
ng:dateFormat
This section explains the built-in XPath function: ng:dateFormat(dateString, inputPattern, outputPattern, locale, customErrorMessage) This function returns a formatted date string, formatted using the Java SimpleDateFormat function (like InterFormNG ...
ng:databaseLookup
You can execute an SQL lookup anywhere in InterFormNG2 (including in the designer) with the built-in Xpath function, ng:databaseLookup. An alternative to this function is the xent files, which can be used for lookup in the workflow only. Other ...
ng:compare
A compare of two values seems very simple on the surface, but with standard XPath there are some potential challenges e.g. if null is compared with an empty string. Some recommendations are found here: 1.Verify if a node exists. 2.Test if a node is ...
ng:base64ToUTF8
The built-in function, ng:base64ToUTF8 converts a base64 encoded string (text) into a UTF8 based string. This can e.g. be used, if you want to extract the original UTF-8 encoded text from a base64 encoded node found in an input XML input file. If the ...
ng:base64EncodeResource
The built-in function, ng:base64EncodeResource converts the binary contents of a resource into base64. 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 ...
ng:base64EncodeFile
The built-in function, ng:base64EncodeFile converts the binary contents of a file into base64. 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 ...
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 ...
Built-in functions
InterFormNG2 comes with multiple built-in XPath functions. The built-in functions can be used XPath expression in both the designer and in the workflow. While editing an XPath expression you can click the icon looking like a magnifying glass: - and ...