In addition to the standard library modules, Workflows supports a number of other built-in helper functions such as for data type and format conversions.
For examples, see the Syntax cheat sheet.
Conversion functions
Convert values from one data type to another.
Functions | |
---|---|
double() |
Accepts an attribute of type string or integer and returns a double. |
int() |
Accepts an attribute of type string or double and returns an integer. |
string() |
Accepts an attribute of type integer, double, or boolean and returns a string. |
Data type functions
Operate on lists, maps, and strings.
Functions | |
---|---|
in() |
Checks whether a given key is present in a list or map. See Check existence of a key in a list or Check existence of a key in a map. |
keys() |
Accepts an attribute of type map and returns a list of key elements in the map. |
len() |
Computes the length of a value according to its type. Accepts an attribute of type list, map, or string and returns an integer.
|
Conditional functions
Support conditions within expressions.
Functions | |
---|---|
default(val, defaultVal) |
Returns a value if it is not null; otherwise returns a default value.
You can use You can also use |
if(condition, ifTrue, ifFalse) |
Evaluates a condition and returns one of two arguments depending on what the condition evaluates to.
Note that arguments passed to |
Type functions
Return data type.
Functions | |
---|---|
get_type(arg) |
Returns a string indicating the data type of If the operand is a function or a subworkflow,
a |