Mendix 7 is no longer supported unless you have Extended Support (for details, please contact Mendix Support). Mendix 7 documentation will remain available for customers with Extended Support until July, 2024.

XPath sum

Last modified: June 29, 2022

1 Overview

The sum() function returns the sum of its argument.

The function requires an XPath query as argument.

The function must specify a column in the query to aggregate.

The query must specify an attribute that has a numeric type.

2 Examples

This query returns the sum of the total prices of all placed orders:

1
sum(//Sales.Order/TotalPrice)

This query returns the sum of the total prices of all the orders placed by a customer named “Jansen”:

1
sum(//Sales.Order[Sales.Customer_Order/Sales.Customer/Name = 'Jansen']/TotalPrice)