Note: Nintex Apps data centers are located in West US and Australia (AUS). In-region processing of Nintex Apps data is only available in these regions.

Formula and Function Reference

Nintex Apps uses formulas and functions in:

  • UI-Only fields, to define the metadata of a field with a Display type set to Formula. (Select code-block Edit Formula to open the Formula Editor.)
  • Metadata overrides when a field's Display type is changed to Formula. (Select code-block Edit Formula to open the Formula Editor.)
  • In situations where an action occurs as the result of a formula, for example in Update rows and in logic actions. (Select code-block Branch Formula to open the Formula Editor.)

When the Formula Editor is open, Nintex Apps offers dropdown menus of Operators, Functions, and (when applicable) Fields. ( Only those fields subject to the formula are offered. )

Formula Functions with UI-Only Fields

When a UI-Only field's display type is set to Formula, the field's value are determined by the statement listed within the Formula tab of the Properties pane. To create this formula statement, you may use merge variables, strings, numbers, and a variety of UI-Only functions.

Formula Return Type

A UI-Only field's formula return type determines how Nintex Apps stores the result of the formula. Options include:

  • Checkbox
  • Currency
  • Date
  • Datetime

Nintex Apps stores all date and datetime fields in ISO 8601 format.

When directly manipulating the value of a date or date time field in a Nintex Apps model, the value must be formatted as follows:

  • Dates: yyyy-MM-dd
  • DateTimes: yyyy-MM-dd'T'HH:mm:ss[.SSS]'Z'
  • Percent
  • Number
  • Text

After evaluating a field's formula, Nintex Apps attempts to convert the result into the selected return type. For example, if the result of the formula is the text value "003" and the return type is Number, Nintex Apps converts that value into an actual number, 3 , before storing it in the model.

Important:  It's important that the formula return type be appropriate for the output of the function. For example, for a formula that formats a date value into a non- ISO 8601 format, select an output type of Text. If you instead select the Datetime return type, Nintex Apps attempts to convert that date string into an actual date value —and errors may occur.

Operators

For all formula functions, Nintex Apps uses standard transactional operators within formulas.

Equality operators in Nintex Apps

Equality operators are always interpreted strictly, meaning they compare both type and value. For example, the formula 1 = "1" returns false, because "1" is a string type, even though the value could be interpreted as "one."

Note: 

Even if these equality operators are formatted non-strictly ( = and !== ), Nintex Apps nonetheless interprets them strictly. Both = and == are interpreted as follows:

1 = "1" returns false

1 == "1" also returns false

Important:  In previous Nintex Apps releases, equality operators could be used non-strictly ( == for equal and !== for does not equal). This functionality is no longer supported.

Conditional operation

  • IF: Returns one of two values based on whether an equation (or equations) are true or false.

    IF(equations, value1, value2)

    • equations: The equations to evaluate. Equations can be evaluated using the transactional operators and can be chained with the && and || operators.
    • value1: The value returned if the equation is true.
    • value2: The value returned if the equation is false.
  • ISBLANK: Returns true or false based on whether its parameter is blank. This function returns true if its parameter is an empty string, null, or undefined.

    True examples:

    • ISBLANK('') = true
    • ISBLANK(null) = true
    • ISBLANK(undefined) = true

    False examples:

    • ISBLANK('test') = false

    • ISBLANK(true) = false

    • ISBLANK(9) = false

      Note:  If the string contains a value that's typically false-y, that is not considered blank.

    • ISBLANK("0") = false

    • ISBLANK("false") = false

  • NOT: Returns the opposite boolean value of its parameter, which must be a boolean value or an expression that evaluates to a boolean value. For expressions returning true, this formula returns false, and vice versa.

    • NOT(true) = false
    • NOT(false) = true
    • NOT(2+2==4) = false
    • NOT(2+2==7) = true
    • NOT(ISBLANK('')) = false
    • NOT(ISBLANK('Not an empty string')) = true

    Note:  While expressions within this function evaluate before this function executes, if those expressions return non-boolean values (like strings or null values) then this function returns true.

Specific function examples

Note:  Strings must be surrounded by single ( 'string' ) or double quotes ( "string "). Either work; just be consistent. While JavaScript uses both, both the Salesforce and JSON formats favor double quotes, so that is used in the following examples.

Custom Formula Functions

Note:  If you are a developer and would like to learn more about creating custom formula functions using JavaScript, see the skuid.formula API documentation.

To use a custom formula function within the Page Designer:

  1. Ensure the formula function is available to a page within either an inline resource or a static resource.

  2. Input the namespace —followed by two underscores —and the name of the formula function in the formula field:

    nameSpace__formulaName(arg1, ... argN)