List of Functions

Prebuilt expressions are divided into the following function types:

  • String
  • Collection
  • Logical comparison
  • Conversion
  • Math
  • Date
  • Timex
  • URI parsing
  • Object manipulation and construction
  • Regular expression
  • Type checking

You can also view the list in alphabetical order.

String functions

FunctionExplanation
lengthReturn the length of a string.
replaceReplace a substring with the specified string and return the updated string. This function is case-sensitive.
replaceIgnoreCaseReplace a substring with the specified string, and return the updated string. This function is case-insensitive.
splitReturn an array that contains substrings based on the delimiter specified.
substringReturn characters from a string.
toLowerReturn a string in lowercase in an optional locale format.
toUpperReturn a string in uppercase in an optional locale format.
trimRemove leading and trailing white spaces from a string.
addOrdinalReturn the ordinal number of the input number.
endsWithCheck whether a string ends with a specific substring. Return true if the substring is found, or return false if not found. This function is case-insensitive.
startsWithCheck whether a string starts with a specific substring. Return true if the substring is found, or return false if not found. This function is case-insensitive.
countWordReturn the number of words in the given string.
concatCombine two or more strings and return the resulting string.
newGuidReturn a new Guid string.
indexOfReturn the starting position or index value of a substring or searches for the specified object and return the zero-based index of the first occurrence within the entire list. This function is case-insensitive, and indexes start with the number 0.
lastIndexOfReturn the starting position or index value of the last occurrence of a substring or search for the specified object and return the zero-based index of the last occurrence within the range of elements in the list. This function is case-insensitive, and indexes start with the number 0.
sentenceCaseCapitalize the first letter of the first word in a string in an optional local format.
titleCaseCapitalize the first letter of each word in a string in an optional locale format.
reverseReverse the order of the elements in a string or array.

Collection functions

FunctionExplanation
containsWorks to find an item in a string, to find an item in an array, or to find a parameter in a complex object. Examples: contains('hello world', 'hello'), contains(createArray('1','2'), '1'), contains(json("{'foo':'bar'}"), 'foo').
firstReturn the first item from the collection.
joinReturn a string that has all the items from an array and has each character separated by a delimiter. Example: join(createArray('a','b'), '.') = "a.b".
lastReturn the last item from the collection.
countReturn the number of items in the collection.
foreachOperate on each element and return the new collection.
unionReturn a collection that has all the items from the specified collections.
skipRemove items from the front of a collection, and return the remaining items.
takeReturn items from the front of a collection.
intersectionReturn a collection that has only the common items across the specified collections.
subArrayReturn a subarray from specified start and end position. Index values start with the number 0.
selectOperate on each element and return the new collection of transformed elements.
whereFilter on each element and return the new collection of filtered elements which match the specific condition.
sortBySort elements in the collection in ascending order and return the sorted collection.
sortByDescendingSort elements in the collection in descending order and return the sorted collection.
indicesAndValuesTurn an array or object into an array of objects with index and value property.
flattenFlatten arrays into an array with non-array values.
uniqueRemove all duplicates from an array.
anyDetermines whether any elements of a sequence satisfy a condition.
allDetermine whether all elements of a sequence satisfy a condition.
reverseReverse the order of the elements in a string or array.
mergeMerges multiple JSON objects or items in an array together.

Logical comparison functions

FunctionExplanation
andLogical AND. Return true if all specified expressions evaluate to true.
equalsComparison equal. Return true if specified values are equal.
emptyCheck if the target is empty.
greaterComparison greater than. Return true if the first value is more, or return false if less.
greaterOrEqualsComparison greater than or equal to. Return true if the first value is greater or equal, or return false if the first value is less.
ifCheck whether an expression is true or false. Based on the result, return a specified value.
lessComparison less than operation. Return true if the first value is less, or return false if the first value is more.
lessOrEqualsComparison less than or equal operation. Return true if the first value is less than or equal, or return false if the first value is more.
notLogical NOT operator. Return true if the expression is false, or return false if true.
orLogical OR operation. Return true if at least one expression is true, or return false if all are false.
existsEvaluate an expression for truthiness.

Conversion functions

FunctionExplanation
floatReturn the floating point representation of the specified string.
intReturn the integer representation of the specified string.
stringReturn the string version of the specified value in an optional locale format.
boolReturn the Boolean representation of the specified string.
createArrayCreate an array from multiple inputs.
jsonReturn the JavaScript Object Notation (JSON) type value or object of a string or XML.
base64Return the base64-encoded version of a string or byte array.
base64ToBinaryReturn the binary version for a base64-encoded string.
base64ToStringReturn the string version of a base64-encoded string.
binaryReturn the binary version for an input value.
dataUriReturn the URI for an input value.
dataUriToBinaryReturn the binary version of a data URI.
dataUriToStringReturn the string version of a data URI.
uriComponentReturn the URI-encoded version for an input value by replacing URL-unsafe characters with escape characters.
uriComponentToStringReturn the string version of a URI-encoded string.
xmlReturn the XML version of a string.
formatNumberFormat a value to the nearest number to the specified number of fractional digits and an optional specified locale.
jsonStringifyReturn the JSON string of a value.
stringOrValueWrap string interpolation to get the real value. For example, stringOrValue('${1}') returns the number 1, while stringOrValue('${1} item') returns the string "1 item".

Math functions

FunctionExplanation
absReturns the absolute value of the specified number.
addMathematical and. Return the result from adding two numbers (pure number case) or concatenating two or more strings.
divMathematical division. Return the integer result from dividing two numbers.
maxReturn the largest value from a collection.
minReturn the smallest value from a collection.
modReturn the remainder from dividing two numbers.
mulMathematical multiplication. Return the product from multiplying two numbers.
randReturn a random number between specified min and max value.
sqrtReturn the square root of a specified number.
subMathematical subtraction. Return the result from subtracting the second number from the first number.
sumReturn the sum of numbers in an array.
rangeReturn an integer array that starts from a specified integer.
expReturn exponentiation of one number to another.
averageReturn the average number of a numeric array.
floorReturn the largest integral value less than or equal to the specified number.
ceilingReturn the smallest integral value greater than or equal to the specified number.
roundRound a value to the nearest integer or to the specified number of fractional digits.

Date and time functions

FunctionExplanation
addDaysAdd a number of specified days to a given timestamp in an optional locale format.
addHoursAdd a specified number of hours to a given timestamp in an optional locale format.
addMinutesAdd a specified number of minutes to a given timestamp in an optional locale format.
addSecondsAdd a specified number of seconds to a given timestamp.
dayOfMonthReturn the day of a month for a given timestamp or Timex expression.
dayOfWeekReturn the day of the week for a given timestamp.
dayOfYearReturn the day of the year for a given timestamp.
formatDateTimeReturn a timestamp in an optional locale format.
formatEpochReturn a timestamp in an optional locale format from UNIX Epoch time.
formatTicksReturn a timestamp in an optional locale format from ticks.
subtractFromTimeSubtract a number of time units from a timestamp in an optional locale format.
utcNowReturn the current timestamp in an optional locale format as a string.
dateReadBackUse the date-time library to provide a date readback.
monthReturn the month of given timestamp.
dateReturn the date for a given timestamp.
yearReturn the year for the given timestamp.
getTimeOfDayReturn the time of day for a given timestamp.
getFutureTimeReturn the current timestamp in an optional locale format plus the specified time units.
getPastTimeReturn the current timestamp in an optional locale format minus the specified time units.
addToTimeAdd a number of time units to a timestamp in an optional locale format.
convertFromUTCConvert a timestamp in an optional locale format from Universal Time Coordinated (UTC).
convertToUTCConvert a timestamp in an optional locale format to Universal Time Coordinated (UTC).
startOfDayReturn the start of the day for a timestamp in an optional locale format.
startOfHourReturn the start of the hour for a timestamp in an optional locale format.
startOfMonthReturn the start of the month for a timestamp in an optional locale format.
ticksReturn the ticks property value of a specified timestamp.
ticksToDaysConvert a ticks property value to the number of days.
ticksToHoursConvert a ticks property value to the number of hours.
ticksToMinutesConvert a ticks property value to the number of minutes.
dateTimeDiffReturn the difference in ticks between two timestamps.
getPreviousViableDateReturn the previous viable date of a Timex expression based on the current date and an optionally specified timezone.
getNextViableDateReturn the next viable date of a Timex expression based on the current date and an optionally specified timezone.
getPreviousViableTimeReturn the previous viable time of a Timex expression based on the current time and an optionally specified timezone.
getNextViableTimeReturn the next viable time of a Timex expression based on the current time and an optionally specified timezone.

Timex functions

FunctionExplanation
isPresentReturn true if the TimexProperty or Timex expression refers to the present.
isDurationReturn true if the TimexProperty or Timex expression refers to a duration.
isTimeReturn true if the TimexProperty or Timex expression refers to a time.
isDateReturn true if the TimexProperty or Timex expression refers to a date.
isTimeRangeReturn true if the TimexProperty or Timex expression refers to a time range.
isDateRangeReturn true if the TimexProperty or Timex expression refers to a date range.
isDefiniteReturn true if the TimexProperty or Timex expression refers to a definite day.
resolveReturn a string of a given TimexProperty or Timex expression if it refers to a valid time.

URI parsing functions

FunctionExplanation
uriHostReturn the host value of a uniform resource identifier (URI).
uriPathReturn the path value of a uniform resource identifier (URI).
uriPathAndQueryReturn the path and query values for a uniform resource identifier (URI).
uriPortReturn the port value of a uniform resource identifier (URI).
uriQueryReturn the query value of a uniform resource identifier (URI).
uriSchemeReturn the scheme value of a uniform resource identifier (URI).

Object manipulation and construction functions

FunctionExplanation
addPropertyAdd a property and its value, or name-value pair, to a JSON object and return the updated object.
removePropertyRemove a property from JSON object and return the updated object.
setPropertySet the value of a JSON object's property and return the updated object.
getPropertyReturn the value of a specified property or root property from a JSON object.
coalesceReturn the first non-null value from one or more parameters.
setPathToValueSet the value of a specific path and return the value.


Type checking functions

FunctionExplanation
EOLReturn the end of line (EOL) sequence text.
isIntegerReturn true if the given input is an integer number.
isFloatReturn true if the given input is a float point number.
isBooleanReturn true if the given input is a Boolean.
isArrayReturn true if the given input is an array.
isObjectReturn true if the given input is an object.
isDateTimeReturn true if the given input is a UTC ISO format timestamp.
isStringReturns true if the given input is a string.