Why cant I sum numeric attributes in an xPath constraint?
I have a microflow retrieve object action (retrieve from database). I want to retrieve all objects where the sum of 2 numeric attributes is greater than the value of a third numeric attribute, so I am setting an xPath constraint : [IssuedQuantity + DisposedQuantity > ReceivedQuantity] This is returning an error "no viable alterenative at input 'IssuedQuantity' The Mendix ref guide5 (https://world.mendix.com/display/refguide5/XPath+Expressions) has the following comparable example: //Sales.Order[TotalPrice + ShippingPrice < 50.00] So why is my constraint failing? And what does this error actually mean? It seems to be a syntax error relating to the first part of the expression (the sum), but I have tried every permutation of brackets & parentheses I can think of & nothing works. Thanks.
Maybe the internal xpath engine may support this but the documentation is incorrect. Both the forms and microflow retrieve XPath do not allow plus(+) and minus (-) operators. This was already the case in 4.3.2.
Chris de Gelder
Unfortunately, Mendix XPath differs somewhat from 'real' XPath.
I also elaborated upon this a little in this thread: