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
Function | Explanation |
---|---|
length | Return the length of a string. |
replace | Replace a substring with the specified string and return the updated string. This function is case-sensitive. |
replaceIgnoreCase | Replace a substring with the specified string, and return the updated string. This function is case-insensitive. |
split | Return an array that contains substrings based on the delimiter specified. |
substring | Return characters from a string. |
toLower | Return a string in lowercase in an optional locale format. |
toUpper | Return a string in uppercase in an optional locale format. |
trim | Remove leading and trailing white spaces from a string. |
addOrdinal | Return the ordinal number of the input number. |
endsWith | Check 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. |
startsWith | Check 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. |
countWord | Return the number of words in the given string. |
concat | Combine two or more strings and return the resulting string. |
newGuid | Return a new Guid string. |
indexOf | Return 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. |
lastIndexOf | Return 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. |
sentenceCase | Capitalize the first letter of the first word in a string in an optional local format. |
titleCase | Capitalize the first letter of each word in a string in an optional locale format. |
reverse | Reverse the order of the elements in a string or array. |
Collection functions
Function | Explanation |
---|---|
contains | Works 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') . |
first | Return the first item from the collection. |
join | Return 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" . |
last | Return the last item from the collection. |
count | Return the number of items in the collection. |
foreach | Operate on each element and return the new collection. |
union | Return a collection that has all the items from the specified collections. |
skip | Remove items from the front of a collection, and return the remaining items. |
take | Return items from the front of a collection. |
intersection | Return a collection that has only the common items across the specified collections. |
subArray | Return a subarray from specified start and end position. Index values start with the number 0. |
select | Operate on each element and return the new collection of transformed elements. |
where | Filter on each element and return the new collection of filtered elements which match the specific condition. |
sortBy | Sort elements in the collection in ascending order and return the sorted collection. |
sortByDescending | Sort elements in the collection in descending order and return the sorted collection. |
indicesAndValues | Turn an array or object into an array of objects with index and value property. |
flatten | Flatten arrays into an array with non-array values. |
unique | Remove all duplicates from an array. |
any | Determines whether any elements of a sequence satisfy a condition. |
all | Determine whether all elements of a sequence satisfy a condition. |
reverse | Reverse the order of the elements in a string or array. |
merge | Merges multiple JSON objects or items in an array together. |
Logical comparison functions
Function | Explanation |
---|---|
and | Logical AND. Return true if all specified expressions evaluate to true. |
equals | Comparison equal. Return true if specified values are equal. |
empty | Check if the target is empty. |
greater | Comparison greater than. Return true if the first value is more, or return false if less. |
greaterOrEquals | Comparison greater than or equal to. Return true if the first value is greater or equal, or return false if the first value is less. |
if | Check whether an expression is true or false. Based on the result, return a specified value. |
less | Comparison less than operation. Return true if the first value is less, or return false if the first value is more. |
lessOrEquals | Comparison 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. |
not | Logical NOT operator. Return true if the expression is false, or return false if true. |
or | Logical OR operation. Return true if at least one expression is true, or return false if all are false. |
exists | Evaluate an expression for truthiness. |
Conversion functions
Function | Explanation |
---|---|
float | Return the floating point representation of the specified string. |
int | Return the integer representation of the specified string. |
string | Return the string version of the specified value in an optional locale format. |
bool | Return the Boolean representation of the specified string. |
createArray | Create an array from multiple inputs. |
json | Return the JavaScript Object Notation (JSON) type value or object of a string or XML. |
base64 | Return the base64-encoded version of a string or byte array. |
base64ToBinary | Return the binary version for a base64-encoded string. |
base64ToString | Return the string version of a base64-encoded string. |
binary | Return the binary version for an input value. |
dataUri | Return the URI for an input value. |
dataUriToBinary | Return the binary version of a data URI. |
dataUriToString | Return the string version of a data URI. |
uriComponent | Return the URI-encoded version for an input value by replacing URL-unsafe characters with escape characters. |
uriComponentToString | Return the string version of a URI-encoded string. |
xml | Return the XML version of a string. |
formatNumber | Format a value to the nearest number to the specified number of fractional digits and an optional specified locale. |
jsonStringify | Return the JSON string of a value. |
stringOrValue | Wrap 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
Function | Explanation |
---|---|
abs | Returns the absolute value of the specified number. |
add | Mathematical and. Return the result from adding two numbers (pure number case) or concatenating two or more strings. |
div | Mathematical division. Return the integer result from dividing two numbers. |
max | Return the largest value from a collection. |
min | Return the smallest value from a collection. |
mod | Return the remainder from dividing two numbers. |
mul | Mathematical multiplication. Return the product from multiplying two numbers. |
rand | Return a random number between specified min and max value. |
sqrt | Return the square root of a specified number. |
sub | Mathematical subtraction. Return the result from subtracting the second number from the first number. |
sum | Return the sum of numbers in an array. |
range | Return an integer array that starts from a specified integer. |
exp | Return exponentiation of one number to another. |
average | Return the average number of a numeric array. |
floor | Return the largest integral value less than or equal to the specified number. |
ceiling | Return the smallest integral value greater than or equal to the specified number. |
round | Round a value to the nearest integer or to the specified number of fractional digits. |
Date and time functions
Function | Explanation |
---|---|
addDays | Add a number of specified days to a given timestamp in an optional locale format. |
addHours | Add a specified number of hours to a given timestamp in an optional locale format. |
addMinutes | Add a specified number of minutes to a given timestamp in an optional locale format. |
addSeconds | Add a specified number of seconds to a given timestamp. |
dayOfMonth | Return the day of a month for a given timestamp or Timex expression. |
dayOfWeek | Return the day of the week for a given timestamp. |
dayOfYear | Return the day of the year for a given timestamp. |
formatDateTime | Return a timestamp in an optional locale format. |
formatEpoch | Return a timestamp in an optional locale format from UNIX Epoch time. |
formatTicks | Return a timestamp in an optional locale format from ticks. |
subtractFromTime | Subtract a number of time units from a timestamp in an optional locale format. |
utcNow | Return the current timestamp in an optional locale format as a string. |
dateReadBack | Use the date-time library to provide a date readback. |
month | Return the month of given timestamp. |
date | Return the date for a given timestamp. |
year | Return the year for the given timestamp. |
getTimeOfDay | Return the time of day for a given timestamp. |
getFutureTime | Return the current timestamp in an optional locale format plus the specified time units. |
getPastTime | Return the current timestamp in an optional locale format minus the specified time units. |
addToTime | Add a number of time units to a timestamp in an optional locale format. |
convertFromUTC | Convert a timestamp in an optional locale format from Universal Time Coordinated (UTC). |
convertToUTC | Convert a timestamp in an optional locale format to Universal Time Coordinated (UTC). |
startOfDay | Return the start of the day for a timestamp in an optional locale format. |
startOfHour | Return the start of the hour for a timestamp in an optional locale format. |
startOfMonth | Return the start of the month for a timestamp in an optional locale format. |
ticks | Return the ticks property value of a specified timestamp. |
ticksToDays | Convert a ticks property value to the number of days. |
ticksToHours | Convert a ticks property value to the number of hours. |
ticksToMinutes | Convert a ticks property value to the number of minutes. |
dateTimeDiff | Return the difference in ticks between two timestamps. |
getPreviousViableDate | Return the previous viable date of a Timex expression based on the current date and an optionally specified timezone. |
getNextViableDate | Return the next viable date of a Timex expression based on the current date and an optionally specified timezone. |
getPreviousViableTime | Return the previous viable time of a Timex expression based on the current time and an optionally specified timezone. |
getNextViableTime | Return the next viable time of a Timex expression based on the current time and an optionally specified timezone. |
Timex functions
Function | Explanation |
---|---|
isPresent | Return true if the TimexProperty or Timex expression refers to the present. |
isDuration | Return true if the TimexProperty or Timex expression refers to a duration. |
isTime | Return true if the TimexProperty or Timex expression refers to a time. |
isDate | Return true if the TimexProperty or Timex expression refers to a date. |
isTimeRange | Return true if the TimexProperty or Timex expression refers to a time range. |
isDateRange | Return true if the TimexProperty or Timex expression refers to a date range. |
isDefinite | Return true if the TimexProperty or Timex expression refers to a definite day. |
resolve | Return a string of a given TimexProperty or Timex expression if it refers to a valid time. |
URI parsing functions
Function | Explanation |
---|---|
uriHost | Return the host value of a uniform resource identifier (URI). |
uriPath | Return the path value of a uniform resource identifier (URI). |
uriPathAndQuery | Return the path and query values for a uniform resource identifier (URI). |
uriPort | Return the port value of a uniform resource identifier (URI). |
uriQuery | Return the query value of a uniform resource identifier (URI). |
uriScheme | Return the scheme value of a uniform resource identifier (URI). |
Object manipulation and construction functions
Function | Explanation |
---|---|
addProperty | Add a property and its value, or name-value pair, to a JSON object and return the updated object. |
removeProperty | Remove a property from JSON object and return the updated object. |
setProperty | Set the value of a JSON object's property and return the updated object. |
getProperty | Return the value of a specified property or root property from a JSON object. |
coalesce | Return the first non-null value from one or more parameters. |
setPathToValue | Set the value of a specific path and return the value. |
Type checking functions
Function | Explanation |
---|---|
EOL | Return the end of line (EOL) sequence text. |
isInteger | Return true if the given input is an integer number. |
isFloat | Return true if the given input is a float point number. |
isBoolean | Return true if the given input is a Boolean. |
isArray | Return true if the given input is an array. |
isObject | Return true if the given input is an object. |
isDateTime | Return true if the given input is a UTC ISO format timestamp. |
isString | Returns true if the given input is a string. |
Updated 8 days ago
What’s Next