Inline function reference
This topic describes the behavior of inline functions and provides function descriptions, including examples and arguments.
Note: Additional functions can be added with the NWAdmin.exe tool.
Function behavior
The parsing engine first replaces any inserted reference tokens and then evaluates the resulting text for functions.
If a function contains another function as an argument, then the inner-most function is evaluated first.
As reference tokens are replaced first, the reference token can also contain function syntax.
If text used for a function argument contains function syntax (for example, a brace or comma character), then wrap the argument with the tokens {TextStart} and {TextEnd} to indicate a block of text that should not be parsed further. For example, if a number variable that contains a decimal value is passed to the function, and the decimal separator for your region is a comma, then use the {TextStart} and {TextEnd} tokens. In the following example of inserted dynamic text containing inline functions, if the returned title ({ItemProperty:Title}) contains a comma, then the {TextStart} and {TextEnd} tokens ensure that the title is not parsed. If the dynamic text were updated to remove these tokens, then titles returned that included commas would be parsed; the Substring function would treat the text after the first comma as the second argument, instead of the number "2" provided, and the function would error.
Example of inserted dynamic text with inline functions (uses {TextStart} and {TextEnd}tokens and uses functions as arguments for other functions):
You have fn-DateDiffDays({Workflow variable:Start}{Workflow variable:End}) days to complete this task. The product ID is fn-Substring({TextStart}{ItemProperty:Title}{TextEnd},2,5)
Inline function descriptions
This section describes inline functions provided with Nintex Workflow 2019, including examples and arguments.
Function | Description | Examples | Arguments |
---|---|---|---|
fn-Abs |
Returns the absolute value of a number. |
fn-Abs({WorkflowVariable:Number}) |
Number The number to return the absolute value of. |
fn-Currency |
Represents a numeric value as a currency formatted text. |
fn-Currency({WorkflowVariable:Cost}) |
Number A variable containing a numeric value. |
fn-DateDiffDays |
Determines the number of days between two dates. The result can be a decimal value including partial days. |
fn-DateDiffDays({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate}) |
|
fn-DateDiffHours |
Determines the number of hours between two dates. The result can be a decimal value including partial hours. |
fn-DateDiffHours({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate}) |
|
fn-DateDiffMinutes |
Determines the number of minutes between two dates. The result can be a decimal value including partial minutes. |
fn-DateDiffMinutes({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate}) |
|
fn-DateDiffSeconds |
Determines the number of seconds between two dates. The result can be a decimal value including partial seconds. |
fn-DateDiffSeconds({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate}) |
|
fn-FormatDate |
Represents a date time value in text of a specific format. |
fn-FormatDate({WorkflowVariable:MyDate}, d) |
|
fn-Insert |
Adds text in to a larger string. |
fn-Insert({WorkflowVariable:Text}, 4, {ItemProperty:Title}) |
|
fn-Length |
Returns the number of characters in a string. |
fn-Length({WorkflowVariable:Text}) |
Text The string to count the characters of. |
fn-Max |
Returns the greater of two numbers. |
fn-Max({WorkflowVariable:Number1}, {WorkflowVariable:Number2}) |
|
fn-Min |
Returns the lesser of two numbers. |
fn-Min({WorkflowVariable:Number1}, {WorkflowVariable:Number2}) |
|
fn-NewGuid |
Generate a globally unique identifier. |
fn-NewGuid() |
|
fn-PadLeft |
Returns the provided string right aligned and padded to the total length with a specific character. |
fn-PadLeft({WorkflowVariable:Text}, 6) fn-PadLeft({WorkflowVariable:Text}, 6,-) |
|
fn-PadRight |
Returns the provided string left aligned and padded to the total length with a specific character. |
fn-PadRight({WorkflowVariable:Text}, 6) fn-PadRight({WorkflowVariable:Text}, 6,-) |
|
fn-Power |
Raises a number to the specified power. |
fn-Power({WorkflowVariable:Number}, {WorkflowVariable:Power}) |
|
fn-Remove |
Removes a section of text in a larger string. |
fn-Remove({WorkflowVariable:Text},0,3) |
|
fn-Replace |
Replaces a section of text in a larger string. |
fn-Replace({WorkflowVariable:Text},abc,{ItemProperty:Title}) |
|
fn-Round |
Rounds a decimal value to the nearest integer. |
fn-Round({WorkflowVariable:Number}) |
Number The decimal number to round. |
fn-SubString |
Extracts a portion of text from a string. |
fn-SubString({WorkflowVariable:Text},5,10) |
|
fn-ToLower |
Formats text in a string to all lower case. |
fn-ToLower({WorkflowVariable:Text}) |
Text The string to convert to all lower case. |
fn-ToTitleCase |
Formats text in a string to title case. |
fn-ToTitleCase({WorkflowVariable:Text}) |
Text The string to convert to title case. |
fn-ToUpper |
Formats text in a string to all upper case. |
fn-ToUpper({WorkflowVariable:Text}) |
Text The string to convert to all upper case. |
fn-Trim |
Removes leading and trailing whitespace from a string. |
fn-Trim({WorkflowVariable:Text}) |
Text The text to remove leading and trailing whitespace characters from. |
fn-XmlEncode |
Encodes a string to make it safe for viewing in html. |
fn-XmlEncode({WorkflowVariable:Text}) |
Text The text to encode. |
fn-XmlDecode |
Decodes a html safe string to regular text. |
fn-XmlDecode({WorkflowVariable:Text}) |
Text The text to decode. |