How to make a UNION like operation in XPath?

0
Hi there! Did someone knows how to make a UNION operation using XPath?  We´re trying to retrieve the information of two different paths of the same entity in the same data grid   
asked
3 answers
1

Hi!

 

The best way to go about it would be to do this: Do 2 retrieves resulting in 2 lists. Then you use a list operation action of type UNION:

 

 

Alternatively, you could define one retrieve with 2 xpath constraints, with an OR operator in between. 

Hope this helps!

answered
1

Hello Stephanie,

 

In XPath, only these operators work (=, !=, <, <=, >, >=, or, and). as it will be formed as a single query in the backend. Here is the link for your reference.

 

https://docs.mendix.com/refguide/xpath-operators/

 

To use UNION, the best and easiest way is to Filter the records in 2 different activities and merge the result into one list using the UNION activity in the microflow as mentioned by Coos.

 

I hope this answers your question.

answered
0

Hey!

If you can do it in the microflow the way Coos suggested would be the ideal one, but if you HAVE to do it in an xpath, you can use the OR operator to get the desired union result

answered