Runtime functions

This topic describes the runtime functions.

Nintex Mobile supports all runtime functions except for CurrentRowNumber.

and

Returns TRUE where both logical arguments are true. If either are false, returns FALSE.

Usage

and(boolean1, boolean2)

avg

Returns the average value of a set of values.

Usage

avg([set of values])

contains

Returns TRUE where string contains the element.

Usage

contains(string,element)

count

Returns the number of rows in which a control that has a value (not blank) appears within a repeating section.

Usage

count(control)

currency

Returns the formatted currency string for the specified value.

Usage

currency(value)

currentRowNumber

Returns the row number of the Repeating Section the control is contained within.

Usage

currentRowNumber(Control)

date

Returns a new date contructed from the specified parameters.

Usage

date(day, month, yeah, hours, minutes)

dateAddDays

Retuns the date with the specified number of whole days added to it.

Usage

dateAddDays(date, daysToAdd)

dateAddHours

Returns the date with the specified number of whole hours added to it.

Usage

dateAddHours(date, hoursToAdd)

dateAddMinutes

Returns the date with the specified number of whole minutes added to it.

Usage

dateAddMinutes(date, minutesToAdd)

dateAddMonths

Returns the date with the specified number of whole months added to it.

Usage

dateAddMonths(date, monthsToAdd)

dateDiffDays

Returns the number of whole days between date1 and date2.

Usage

dateDiffDays(date1, date2)

dateDiffHours

Returns the number of whole hours between date1 and date2.

Usage

dateDiffHours(date1, date2)

dateDiffMinutes

Returns the number of whole minutes between date1 and date2.

Usage

dateDiffMinutes(date1, date2)

endsWith

Returns TRUE where element is at the end of string.

Usage

endWith(string, element)

equals

Returns TRUE where two items are of equal value.

Usage

equals (value1, value2)

formatDate

Returns the date in the specified format.

Usage

formatDate(date, format)

The specified format can incorporate structures such as "dd/MM/yyyy" or "dddd", "dd MMM". The components of these structures include:

Element​ ​Description ​Example (in US date format)
"dd"​ ​Day of month ​6/15/2009 1:45:30 PM -> 15
"ddd"​ ​Day of week (Single Letter) ​6/15/2009 1:45:30 PM -> M
"dddd"​ ​Day of week (Full) ​6/15/2009 1:45:30 PM -> Monday
"MM"​ ​Month (Numeric) ​6/15/2009 1:45:30 PM -> 6
"MMM"​ ​Month (Short) ​6/15/2009 1:45:30 PM -> Jun
"MMMM"​ ​Month (Full) ​6/15/2009 1:45:30 PM -> June
"yyyy"​ ​Year ​6/15/2009 1:45:30 PM -> 2009
"hh"​ ​Hours (12 Hour) ​6/15/2009 1:45:30 PM -> 1
"HH"​ ​Hours (24 hour) ​6/15/2009 1:45:30 PM -> 13
"mm"​ ​Minutes ​6/15/2009 1:45:30 PM -> 45
"tt"​ ​AM or PM ​6/15/2009 1:45:30 PM -> PM

Alternatively, single character format specifiers can be used.

Format Specifier​ ​Description ​Example (in US date format)
"d"​ ​Short date pattern ​6/15/2009 1:45:30 PM -> 6/15/2009
"D"​ ​Long date pattern ​6/15/2009 1:45:30 PM -> Monday, June 15, 2009
"M", "m"​ ​Month/day pattern ​6/15/2009 1:45:30 PM -> June 15
"s"​ ​Sortable date/time pattern ​6/15/2009 1:45:30 PM -> 2009-06-15T13:45:30
"t"​ ​Short time pattern ​6/15/2009 1:45:30 PM -> 1:45PM
"T"​ ​Long time pattern ​6/15/2009 1:45:30 PM -> 1:45:30PM
"Y", "y"​ ​Year month pattern ​6/15/2009 1:45:30 PM -> June, 2009

greaterThan

Returns TRUE where value1 is greater than value2.

Usage

greaterThan(value1, value2)

greaterThanOrEqual

Returns TRUE where value1 is greater than or equal to value2.

Usage

GreaterThanOrEqual(value1,value2)

if

Checks whether a condition is met, and returns one value if true, and another value if false.

Usage

if(logical_test, value_if_true, value_if_false)

inArray

Returns TRUE where the collection contains the entire specified element.

Usage

inArray(collection, element)

isDate

Returns TRUE where the value is a valid date.

Usage

isDate(value)

isNullOrEmpty

Returns TRUE where value has no data content.

Usage

isNullOrEmpty(value)

isNumeric

Returns TRUE where the value is a valid number.

Usage

isNumeric(value)

length

Returns the length of a string.

Usage

length(string)

lessThan

Returns TRUE where value1 is less than value2.

Usage

lessThan(value1,value2)

lessThanOrEqual

Returns TRUE where value1 is less than or equal to value2.

Usage

LessThanOrEqual(value1,value2)

Lookup

Returns a value form another list based on lookup criteria. For more information, see Lookup function.

Usage

lookup("list title","column to filter on", value to filter on, "output column". [multiple values-boolean] , [value data type])

For an explanation on how to use the Lookup function, see Lookup Function.

max

Returns the maximum value found in a set of values.

Usage

max([set of values])

min

Returns the minimum value found in a set of values.

Usage

min([set of values])

not

Returns the logical reverse of the argument.

Usage

not(boolean)

or

Returns TRUE where either logical arguments are true. Returns FALSE when both logical arguments are False.

Usage

or(boolean1, boolean2)

parseLookup

Returns the text component of the list item in the lookup control if condition evaluates to TRUE. If FALSE, returns the ID of the list item in the lookup control.

Usage

parseLookup([array or single lookup value], [optional bool showText])

Note: A lookup control returns both the ID and text for the selected items in the format "1;Australia". The first part represents the ID of the list item and the second part, the column specified to display in the lookup control as its label. Depending on what you are using the lookup control value for, you will need one part of the value.

For example,

parseLookup(Country) = "Australia"

parseLookup(Country, true) = "Australia"

parseLookup(Country, false) = "1"

replace

Replace part of a string that matches a regular expression pattern (replacePattern) with replacement.

Usage

replace(textToModify, replacePattern, replacement)

rows

Returns the number of rows a control appears in within a repeating section.

Usage

rows(control)

round

Returns a value to the nearest number based on a specific number of decimal places.

Usage

Round(number, [optional numberOfDecimalPlaces])

startsWith

Returns TRUE where element is at the beginning of the string.

Usage

startsWith(string, element)

subString

Returns a part of the string from the character position start for the specified length in characters. The first character is position 0.

Usage

subString(string, start, length)

sum

Returns the result of all the values in a set being added together.

Usage

sum([set of values])

toLower

Converts a string to lower case.

Usage

toLower(string)

toTitleCase

Converts a string to title case, with the first letter of each word capitalized.

Usage

toTitleCase(string)

toUpper

Converts a string to upper case.

Usage

toUpper(string)

trim

Removes any leading and trailing spaces from a string.

Usage

trim(string)

userEquals

Returns TRUE if the two logins are the same, taking into account differences between the two, such as claims authentication tokens.

Usage

userEquals(single login, single login)

Note: SharePoint login names can be the same user even if they have slight differences in the name. When comparing two login names, depending on the source of the login it may be slightly different. The possible sources include a people control, an insert reference token or even the user profile function.

For example: In a claims authentication environment, one source could return "i:0#.w|nintex\kinald" while another may return "nintex\kinald". These are the same user, however one has the with claims token at the start. The userEquals function will ignore the claims prefix and return true when comparing the above logins.

userProfileLookup

Returns the lookup user profile data from SharePoint for the specified user.

Usage

userProfileLookup("domain\login","InternalPropertyName")

Note: The first parameter is a single user login for current SharePoint farm that has a user profile. It would usually be specified either through insert reference or passing the value from a control (ideally a single select people control). The second parameter is the internal name of the user profile property. An example of some of the more common ones are "FirstName", "LastName","HomePhone", "Manager", "Office", "PreferredName", "WorkEmail".

Related information

Inline functions