This help site is based on the available in-product assistance as of December 2016. Please note that this site is provided as a convenience and it does not go through rigorous layout testing.


Back Forward Home Print
Nintex Workflow 2010 > Using the Workflow Designer
Inline functions

In any text input that supports Inserting reference fields, an inline function can be entered that will be resolved at workflow run-time.

A number of functions are provided out of the box, and additional functions can be added with the NWAdmin.exe tool.

Functions can also be used as arguments for other functions.

Example:

Function behavior

The parsing engine first replaces any inserted reference tokens, and then the resulting text is evaluated for functions.

If a function contains another function as an argument, the inner most function will be evaluated first.

As reference tokens are replaced first, the reference token can also contain function syntax that will be evaluated.

If text used for a function argument contains function syntax (i.e. a brace or comma character) wrap the argument with {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, the {TextStart} and {TextEnd} tokens will need to be used.
In the example shown above, when the "Title" of the item is returned, if it were to contain a comma, and the {TextStart}{TextEnd} blocks were not used, then 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.

Function reference

fn-Abs

Returns the absolute value of a number.

Example

fn-Abs({WorkflowVariable:Number})

Arguments

  • Number The number to return the absolute value of.

fn-Currency

Represents a numeric value as a currency formatted text.

Example

fn-Currency({WorkflowVariable:Cost})

Arguments

  • 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.

Example

fn-DateDiffDays({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • 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.

Example

fn-DateDiffHours({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • 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.

Example

fn-DateDiffMinutes({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • 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.

Example

fn-DateDiffSeconds({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • 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.

Example

fn-FormatDate({WorkflowVariable:MyDate}, d)

Arguments

fn-Insert

Adds text in to a larger string.

Example

fn-Insert({WorkflowVariable:Text}, 4, {ItemProperty:Title})

Arguments

  • 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.

Example

fn-Length({WorkflowVariable:Text})

Arguments

  • Text The string to count the characters of.

fn-Max

Returns the greater of two numbers.

Example

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

Arguments

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

fn-Min

Returns the lesser of two numbers.

Example

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

Arguments

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

fn-NewGuid

Generate a globally unique identifier.

Example

fn-NewGuid()

fn-PadLeft

Returns the provided string right aligned and padded to the total length with a specific character.

Example

fn-PadLeft({WorkflowVariable:Text}, 6)

fn-PadLeft({WorkflowVariable:Text}, 6,-)

Arguments

  • 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.

Example

fn-PadRight({WorkflowVariable:Text}, 6)

fn-PadRight({WorkflowVariable:Text}, 6,-)

Arguments

  • 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.

Example

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

Arguments

  • 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.

Example

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

Arguments

  • 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.

Example

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

Arguments

  • 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.

Example

fn-Round({WorkflowVariable:Number})

Arguments

  • Number The decimal number to round.

fn-SubString

Extracts a portion of text from a string.

Example

fn-SubString({WorkflowVariable:Text},5,10)

Arguments

  • 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.

Example

fn-ToLower({WorkflowVariable:Text})

Arguments

  • Text The string to convert to all lower case.

fn-ToTitleCase

Formats text in a string to title case.

Example

fn-ToTitleCase({WorkflowVariable:Text})

Arguments

  • Text The string to convert to title case.

fn-ToUpper

Formats text in a string to all upper case.

Example

fn-ToUpper({WorkflowVariable:Text})

Arguments

  • Text The string to convert to all upper case.

fn-Trim

Removes leading and trailing whitespace from a string.

Example

fn-Trim({WorkflowVariable:Text})

Arguments

  • Text The text to remove leading and trailing whitespace characters from.

fn-XmlEncode

Encodes a string to make it safe for viewing in html.

Example

fn-XmlEncode({WorkflowVariable:Text})

Arguments

  • Text The text to encode.

fn-XmlDecode

Decodes a html safe string to regular text.

Example

fn-XmlDecode({WorkflowVariable:Text})

Arguments

  • Text The text to decode.