Wiki source code of Sum
Version 1.6 by Abdelali EL MAJDOUBI on 2023/08/03 13:00
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | = Introduction = |
2 | |||
3 | The sum function is used to perform the addition of two or more values, which could be either numerical values or xpath expressions. | ||
4 | |||
5 | == Syntax : == | ||
6 | |||
![]() |
1.6 | 7 | * **${ixf:sum(xpathExp1, xpathExp2)}** calculates the sum of the results obtained from evaluating "xpathExp1" and "xpathExp2". |
8 | * **${ixf:sum(xpathExp,"10")}** the result will be the sum of the result obtained from evaluating "xpathExp" and 10. | ||
9 | * **${ixf:sum("10","12","100")}** the result will be 122, which is the sum of the individual results of "10", "12", and "100". | ||
![]() |
1.1 | 10 | |
![]() |
1.4 | 11 | Ensure that numerical values are between double quotes : ${ixf:sum("10","12","100")}, |
![]() |
1.1 | 12 | |
![]() |
1.4 | 13 | while xpath expressions should remain without any quote enclosures. |
![]() |
1.1 | 14 | |
![]() |
1.6 | 15 | |
16 | == Example : == | ||
17 | |||
18 | * ${ixf:sum(Documents/Order/DeliveryAddress/OrderLine/Price,"10"} | ||
19 | |||
![]() |
1.4 | 20 | == Note: == |
![]() |
1.3 | 21 | |
![]() |
1.5 | 22 | Numerical values can be also enclosed within single quotes : ${ixf:sum('10','12','100')} **OR **mix single and double quotes, like this: ${ixf:sum("10",'12','100')}. |
![]() |
1.1 | 23 | |
24 |