Function Reference

Function reference for calculation fields

Calculation Expressions

ABS

Returns the absolute value of a number.

ACOS

Returns the inverse cosine of a value, in radians.

ACOSH

Returns the inverse hyperbolic cosine of a number.

AND

Returns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false.

ARRAY

Returns an array from its arguments, combining and flattening multiple arrays into a single array. It always returns an array regardless of the types and formats of the arguments.

AVERAGE

Returns the numerical average value in a dataset, ignoring text.

CEILING

Rounds a number up to the nearest integer multiple of specified significance.

CHAR

Convert a number into a character according to the current Unicode table.

CHOICEVALUE

Returns the selected value for a choice field or classification field

CHOICEVALUES

Returns the selected values for a choice field or classification field

CLEAN

Returns the text with the non-printable ASCII characters removed.

COALESCE

Returns the first parameter whose value exists

CODE

Returns the numeric Unicode map value of the first character in the string provided.

COMPACT

Removes empty items from an array

CONCATENATE

Returns the concatenation of multiple values.

CONCAT

Returns the concatenation of multiple values. Alias for CONCATENATE()

CONTAINS

Determines whether an array or string contains a given value

COS

Returns the cosine of a value, in radians.

COSH

Returns the hyperbolic cosine of a number.

COUNT

Returns a count of the number of numeric values in a dataset.

COUNTA

Returns a count of values in a dataset.

COUNTBLANK

Returns the number of blank values in a dataset.

DATANAMES

Returns the data names of the form fields

DATE

Converts a provided year, month, and day into a date.

DATEADD

Adds a number of days to a given date

DATEVALUE

Converts a provided date string in a known format to a date value.

DAY

Returns the day of the month that a specific date falls on, in numeric format.

DEGREES

Converts an angle value in radians to degrees.

DESCRIPTION

Returns the description of a given field

DOLLAR

Formats a number into a locale-specific currency format. This function is useful when including a currency amount in a longer piece of text. To display just a currency in a calculated field, it’s recommended to set the display type of the calculated field to ‘Currency’ and just return a number in the expression. When the display type of the calculated field is set to currency, the number is automatically displayed as a formatted currency.

EMAIL

Returns the email address of the current user

EVEN

Returns number rounded up to the nearest even integer.

EXACT

Tests whether two strings are identical.

EXISTS

Tests whether a value exists

EXP

Returns Euler’s number, e (~2.718) raised to a power.

FACT

Returns the factorial of a number.

FACTDOUBLE

Returns the double factorial of a number.

FALSE

Returns the boolean value false.

FIELDTYPE

Returns the field type of a field by its data name

FIND

Returns the position at which a string is first found within text, case-sensitive.

FIRST

Returns the first N items from an array or string

FIXED

Formats a number with a fixed number of decimal places.

FLATTEN

Flatten nested arrays into a flat array

FLOOR

Rounds a number down to the nearest integer multiple of specified significance.

FORMAT

Formats a string

FORMATNUMBER

Formats a number in a given locale. This function is useful when including a number in a longer piece of text. To display just a number in a calculated field, it’s recommended to set the display type of the calculated field to ‘Number’ and just return a number in the expression. When the display type of the calculated field is set to ‘Number’, the number is automatically displayed as a formatted number.

GCD

Returns the greatest common divisor of one or more integers.

GETRESULT

Returns the current result value for the current expression

GROUP

Returns grouped values within an array

HASOTHER

Tests whether a choice field or classification field has an ‘Other’ value entered

IF

Returns one value if a logical expression is true and another if it is false.

INSPECT

Returns the string representation of a value. This function is useful for troubleshooting expressions.

INT

Rounds a number down to the nearest integer that is less than or equal to it.

ISBLANK

Checks whether the field’s value is empty.

ISEVEN

Checks whether the provided value is an even number.

ISLOGICAL

Checks whether a value is true or false.

ISMOBILE

Returns true if the record is being edited from the mobile app

ISNAN

Test whether a value is not a number

ISNEW

Returns a boolean indicating whether the current feature (record or repeatable item) is new. It returns false if it’s being updated.

ISNONTEXT

Tests whether a value is non-textual.

ISNUMBER

Tests whether a value is a number.

ISODD

Checks whether the provided value is an odd number.

ISROLE

Checks whether the current user’s role is one of the arguments

ISSELECTED

Checks whether a given choice is selected for a choice field or classification field

ISTEXT

Checks whether a value is text.

ISUPDATE

Returns a boolean indicating whether the current feature (record or repeatable item) is being updated. It returns false if it’s a new record.

LABEL

Returns the label of a given field

LAST

Returns the last N items from an array or string

LATITUDE

Returns the latitude of the current feature (record or repeatable item).

LCM

Returns the least common multiple of one or more integers.

LEFT

Returns a substring from the beginning of a given string.

LEN

Returns the length of a string value.

LN

Returns the the logarithm of a number, base e (Euler’s number).

LOG

Returns the the logarithm of a number given a base.

LOG10

Returns the the logarithm of a number, base 10.

LONGITUDE

Returns the longitude of the current feature (record or repeatable item)

LOWER

Converts a specified string to lowercase.

LPAD

Pads a string on the left side

MAX

Returns the maximum value in a given set of values.

MAXA

Returns the maximum numeric value in a given set of values.

MEDIAN

Returns the median value in a set of numeric values.

MID

Returns a segment of a string value.

MIN

Returns the minimum value in a given set of values.

MINA

Returns the minimum numeric value in a given set of values.

MOD

Returns the result of the modulo operator, the remainder after a division operation.

MONTH

Returns the month of a given date.

NOT

Returns the opposite of a logical value - NOT(true) returns false; NOT(false) returns true.

NUM

Converts any value to a number

NUMS

Converts multiple parameters to an array of numbers

ODD

Rounds a number up to the nearest odd integer.

ONCE

Returns a value once, given the current value. This is useful to perform a calculation only once, the first time it’s evaluated.

OR

Returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.

OTHER

Returns the current ‘Other’ value for a choice field or classification field

PI

Returns the value of Pi to 15 decimal places.

PLATFORM

Returns the current platform. Currently one of: iOS, Android, or Web.

PLUCK

Extract property values from an object

POWER

Returns a number raised to a power.

PRECISION

Returns the precision of a number

PRODUCT

Returns the result of multiplying a series of numbers together.

PROJECTID

Returns the project ID of the record

PROJECTNAME

Returns the project name of the record

PROPER

Capitalizes each word in a string (title case).

QUOTIENT

Returns the result of dividing one number by another.

RADIANS

Converts a number of degrees to radians.

RAND

Returns a random number between 0 and 1.

RANDBETWEEN

Returns a random integer between two values.

RECORDID

Returns the ID of the current record. This function will always return the top level record ID even when used inside a repeatable. To get the repeatable item ID, use the REPEATABLEID function.

REPEATABLEID

Returns the ID of the current repeatable item.

REPEATABLENUMBER

Returns the sequential number of a repeatable item.

REPEATABLEVALUES

Return a specific field from multiple repeatable items

REPEATABLESUM

Return the sum of a specific numeric field across multiple repeatable items

REPLACE

Replaces a piece of a text string with a different string.

Returns a substring from the end of a given string.

ROLE

Returns the role name of the current user

ROUND

Rounds a number to a specified number of decimal places according to standard rounding rules.

ROUNDDOWN

Rounds a number down to a desired number of decimal places.

ROUNDUP

Rounds a number up to a desired number of decimal places.

RPAD

Pads a string on the right side

Returns the position at which a specified string is first found within a block of text. Ignores case.

SETRESULT

Sets the current result value for the current expression. This is useful in multiline expressions to set the result value.

SHOWERRORS

Enable verbose errors to displays in the app. This is useful for troubleshooting complex expressions.

SHUFFLE

Randomizes an array of items

SIGN

Returns the sign of a given input number. -1 if negative, 1 if positive, 0 if zero.

SIN

Returns the sine of a value, in radians.

SINH

Returns the hyperbolic sine of a number

SORT

Returns the sorted values within an array

SQRT

Calculates the square root of a given number.

SQRTPI

Calculates the square root of the product of Pi and a given number.

STATUS

Returns the current record status value.

STATUSLABEL

Returns the current record status label.

SUBSTITUTE

Replaces existing text with new text in a string.

SUM

Calculates the sum of a range of values.

SUMSQ

Calculates the sum of the squares of a range of values.

TIMEADD

Adds an amount of time to a given time

TIMEDIFF

Returns the difference between 2 time fields

TIMESTAMP

Returns a formatted timestamp

TRIM

Strips the leading and trailing spaces from a string.

TRUE

Returns the boolean value true.

TYPEOF

Returns the type of a value

UNIQUE

Returns the unique values within an array

UPPER

Converts a specified string to uppercase.

USERFULLNAME

Returns the full name of the current user

VALUE

Returns the current value of a field given the field’s data name

VERSIONINFO

Returns version information about the app.

YEAR

Returns the year of a given date.