XPATH help - Return Events associated to Countries defined in a list
Hi, Hoping someone can answer my query I’ve got an entity called Events which can be linked to one of more countries. In a microflow I have a list of countries (user selected these on screen) and I’m trying to Retrieve from Database: - A list of Events that are linked to any of the countries in my list I could loop through each country in the list, retrieving events for that country one at a time but surely there is a better way to do this?
Your current approach is what most Mendix developers would end up with. Good for you that you are considering the performance improvements that should be made here. Unfortunately, Mendix's XPATH has no option to select “Y where Y_X/X in listX”. OQL does have has this implemented, so you might give that a go. For an example go to https://mydemoversion8-sandbox.mxapps.io/p/OQL and try this oql: SELECT FirstName FROM Sales.Customer WHERE Name in ('Bares','Knope')