Function reference
The Functions palette of the visual mapper offers the functions below, in groups. Selecting a function places it on the diagram as a block; see Function blocks.
Inputs marked with * accept a constant in the block's properties panel. An input that expects a number accepts only digits, an optional minus sign, and an optional decimal point. In a grouped loop, the Collection functions and join work over all records of the group; see Grouping.
| Group | Function | Inputs | Result | Description |
|---|---|---|---|---|
| Collection | count | values | whole number | Number of items in a collection. |
| Collection | distinct | values | list of text | Distinct text values of a collection. |
| Collection | first | values | value | First item of a collection. |
| Collection | max | values | number | Largest value of a collection. |
| Collection | min | values | number | Smallest value of a collection. |
| Collection | sum | values | number | Add up a collection. |
| Conversion | to-boolean | value | true/false | Text to boolean: true, 1 and yes are true. |
| Conversion | to-number | value | number | Text to number; anything unparsable becomes 0. |
| Conversion | to-string | value | text | Value as text. |
| Date | to-date | value, format* | text | Reformat a date; the input must be an ISO date or date-time (yyyy-mm-dd, yyyy-mm-ddThh:mm:ss) and the format is an XSLT picture, for example [D01].[M01].[Y0001]. |
| Date | today | format* | text | Current date in the given format, written as an XSLT picture such as [Y0001]-[M01]-[D01]. |
| Logical | and | a, b | true/false | Both conditions hold. |
| Logical | equal | a, b* | true/false | Compare as text. |
| Logical | exists | value | true/false | The node is present and not empty. |
| Logical | greater | a, b* | true/false | a is greater than b, compared as numbers. |
| Logical | if | condition, then*, else* | value | Condition ? then : else. |
| Logical | less | a, b* | true/false | a is less than b, compared as numbers. |
| Logical | not | value | true/false | Negate a condition. |
| Logical | or | a, b | true/false | At least one condition holds. |
| Math | add | a*, b* | number | a + b. |
| Math | divide | a*, b* | number | a / b; division by zero yields 0. |
| Math | multiply | a*, b* | number | a * b. |
| Math | round | value, digits* | number | Round to a number of decimals. |
| Math | subtract | a*, b* | number | a - b. |
| String | concat | value* | text | Join all inputs into one string. |
| String | join | values, separator* | text | Join a collection with a separator. |
| String | lower | value* | text | Lower case. |
| String | pad-left | value*, length*, fill* | text | Pad a string on the left up to a total length. |
| String | replace | value*, pattern*, replacement* | text | Replace every match of a regular expression. In the replacement $1 to $9 insert what a group of the expression matched; any other $ or \ is written as it is. |
| String | substring | value*, start*, length* | text | Part of a string: value, 1-based start, length. |
| String | trim | value* | text | Remove leading and trailing white space. |
| String | upper | value* | text | Upper case. |
| Utility | default | value, fallback* | value | The value, or the fallback when it is missing or empty. |
| Utility | map-value | value, pairs*, fallback* | text | Translate a value through a list such as A=Active;B=Blocked. |
Where no function fits, a target field can take an XPath expression instead. See Constants and expressions.