Functions for lists and numerical values
For more information about lists and a video tutorial, see Working with lists.
The following functions can be used on lists and numbers, including dates and currencies.
| Function | Description | Syntax |
|---|---|---|
append
|
Result is a list, where given items are appended at the end. Requires the list and the specified items to append. |
Examples:
|
at
|
Result is the field value of the item at the specified index position. Count -1 returns the last item in the list. | Examples: at ([$Child:object type/field group:field name$], 5) |
avg
|
Result is a numerical average. Requires one argument, which is an object field or list. Valid for numbers, currencies, and dates. |
Examples: avg
([$Child:object type/field group:field
name$])
|
count
|
Result is the number of objects or items that are counted. Requires one argument, which is an object field or list. Can optionally use Append and Remove with count. |
Example:
|
list
|
Result is a list of items. Multiple arguments allowed. | Example: list ('test1','test2','test3') |
max
|
Result is the maximum value in a list of values. Valid for numbers, currencies, and dates. | Example: max ([$Child:object type/field group:field
name$]) |
min
|
Result is the minimum value in a list of values. Valid for numbers, currencies, and dates. |
Examples: min
([$Child:object type/field group:field
name$])
|
remove
|
Result is a list, where specified items have been removed. Provide the list and the specified items to remove. If items occur multiple times in a list, all occurrences are removed. |
Example: |
round
|
The result is a rounded number. The first argument is a number. The second argument is the number of decimal places the first number is rounded to. You can specify a maximum of 8 decimal places. If you include only a single argument, the result is rounded to a whole number. If the first argument is a list of values, the result is a list of rounded values. |
round (number ,number of
decimal places) round (number) Example: round
([$variableA$], 3) |
round
|
Result is to round a value. Valid for numbers. If the argument is a list of values, the result is a list of rounded values. |
Example: round ([$Child:object type/field group:field name$]) |
sqrt |
Result is the value of the square root of a single number. Valid for numbers.
If the argument is a list of values, the result is a list of square root values. |
Example: sqrt ([$Child:object type/field group:field
name$]) |
square
|
Result is the square value of a single number. Valid for numbers. If the argument is a list of values, the result is a list of squared values. |
Example: square ([$Child:object type/field group:field
name$]) |
sum
|
Result is a sum of a collection of values. Valid for numbers and currencies. | Example: sum ([$Child:object type/field group:field
name$]) |
sum function, using the round function on the values being
summed helps to avoid an inaccurate decimal value in the result. For example, instead of using the
expression sum( if(exists([$inval$])) then [$inval$] else 0 endif ), use the
following expression, replacing <number_of_decimal_places> with the number of
decimal places you want in the
result.sum( if(exists([$inval$])) then round([$inval$],<number_of_decimal_places>) else 0 endif )| Expression | Result | Note |
|---|---|---|
count([$Child:SOXBusEntity/OPSS-BusEnt:Entity Type$])
|
4
|
Given that there are 4 child objects |
at ([$Child:SOXBusEntity/System Fields:Description$],5)
|
Organizational Unit | Given that "Organizational Unit" is the description of the object in the 6th position. |
min(5, 10, 15, 20 )
|
5 | |
list('test1', 'test2', 'test3')
|
'test1', 'test2', 'test3' | Builds a list of items. |
count( list ( 'test1', 'test2' ) )
|
2 | Builds a list and counts the items in it. |
|
|
Result is the number of child objects plus 1 | Adds to a count. |