Reflects the current release of Nintex for SharePoint 2016. For your version, please access assistance through the Help button in the product.

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 2016, 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})

  • Start date The starting date and time to calculate the difference between.
  • End date The end date and time to calculate the difference between.

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})

  • Start date The starting date and time to calculate the difference between.
  • End date The end and time date to calculate the difference between.

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})

  • Start date The starting date and time to calculate the difference between.
  • End date The end and time date to calculate the difference between.

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})

  • Start date The starting date and time to calculate the difference between.
  • End date The end and time date to calculate the difference between.

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})

  • Text The text to modify.
  • Start position The character position to insert the new text at. The first character in the string is at position 0.
  • New text The additional text that will be added at the start position.

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})

  • Number 1 The first number to compare.
  • Number 2 The second number to compare.

fn-Min

Returns the lesser of two numbers.

fn-Min({WorkflowVariable:Number1}, {WorkflowVariable:Number2})

  • Number 1 The first number to compare.
  • Number 2 The second number to compare.

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,-)

  • Text The string to pad.
  • Length The target total length of the padded result.
  • Character Optional. The character to pad the original string with. A space character is used by default.

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,-)

  • Text The string to pad.
  • Length The target total length of the padded result.
  • Character Optional. The character to pad the original string with. A space character is used by default.

fn-Power

Raises a number to the specified power.

fn-Power({WorkflowVariable:Number}, {WorkflowVariable:Power})

  • Number The number to raise to the power.
  • Number The power to raise number to.

fn-Remove

Removes a section of text in a larger string.

fn-Remove({WorkflowVariable:Text},0,3)

  • Text The text to modify.
  • Start position The character position from which to remove the following characters. The first character in the string is at position 0.
  • Length Optional. The number of characters from the start position to remove. All remaining characters will be removed by default.

fn-Replace

Replaces a section of text in a larger string.

fn-Replace({WorkflowVariable:Text},abc,{ItemProperty:Title})

  • Text The text to modify.
  • Old value The text to search for and replace.
  • New value The text to replace Old value with.

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)

  • Text The text to extract a value from
  • Start index The position in the text of the first character to retrieve. The first character in the string is at position 0.
  • Number of characters The number of characters to retrieve from the start index.

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.

Related information

Enter inline functions