The following mathematical functions have been provided:
- Avg
- Count
- Max
- Min
- Round
- Summation
Avg
Average determines the average value of all arguments and returns this one. The function NodeValues can also be used as argument.
Syntax |
Return value |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6fa5a1b5-93fb-4599-b321-61607dd6a354"><ac:plain-text-body><![CDATA[ |
avg(arg[1],.. arg[n]) |
Double |
]]></ac:plain-text-body></ac:structured-macro> |
Example |
|
||
Expression: |
Result: |
||
avg(1,2,3,4,5) |
3 |
Count
Count returns the number of all arguments (indicating how many arguments there are). The functions NodeValues and Nodes can also be used as arguments.
Syntax |
Return value |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bc3cb8ea-50f7-4154-b386-926d459fd934"><ac:plain-text-body><![CDATA[ |
count(arg[1],.. arg[n]) |
Integer |
]]></ac:plain-text-body></ac:structured-macro> |
Example |
|
||
Expression: |
Result: |
||
count(1,1,2,2) |
4 |
||
count(nodes("/purchaseOrder/item/quantity")) |
3 |
Max
Max returns the maximum of all arguments. The function NodeValues can also be used as argument.
Syntax |
Return value |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5a4f5986-c6bc-406b-aec2-daa0d1b2699f"><ac:plain-text-body><![CDATA[ |
max(arg[1],.. arg[n]) |
Double |
]]></ac:plain-text-body></ac:structured-macro> |
Example |
|
||
Expression: |
Result: |
||
max(1,2,3,4,5) |
5 |
||
max(nodeValues("/purchaseOrder/item/quantity")) |
100 |
Min
Min returns the minimum of all arguments. The function NodeValues can also be used as argument.
Syntax |
Return value |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9a16a04a-71c6-4864-bfe5-9ae0fa4744a1"><ac:plain-text-body><![CDATA[ |
min(arg[1],.. arg[n]) |
Double |
]]></ac:plain-text-body></ac:structured-macro> |
Example |
|
||
Expression: |
Result: |
||
min(1,2,3,4,5) |
1 |
||
min(nodeValues("/purchaseOrder/item/quantity")) |
0.0 |
Round
The Round function rounds the argument, after the right-of-comma position Up or Down, indicated in the second argument, are rounded. (Values < 5 are rounded down and Values >= 5 are rounded up!)
Syntax |
Return value |
Double |
|
Example |
|
Expression: |
Result: |
round(1.2345,3) |
1.235 |
Summation
Summation determines the total value of all arguments, and returns this one. The function NodeValues can also be used as an argument.
Syntax |
Return value |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="525a9d9c-e81d-4a1b-91c5-d38ee5f45ea3"><ac:plain-text-body><![CDATA[ |
sum(arg[1], .. arg[n]) |
Double |
]]></ac:plain-text-body></ac:structured-macro> |
Example |
|
||
Expression: |
Result: |
||
sum(2,3,4,5) |
14.0 |
||
sum(nodeValues("/purchaseOrder/item/quantity"))= |
102.0 |