XPath - Get Childeren by Parent property

0
I have a question about XPath which I just cant seam to figure out. Lets say I have 2 Domain models. Person and Address. Person is a 1 to many assotiation with Address which is called Person_Addresses. The Person model has the property Name and Age. Say I want all the Addresses of people above a certain age. I want this in a List view. I setup the list view so that XPath is the datasource, I select the entity (which is Address) and then set my XPAth. I tried setting it to //Address[Person_Addresses/Age>=40]. I then read the documentation and it said “In Studio Pro you do not write complete queries but only the constraints”. Then how do I find all Addresses where People above a certain age live? SO how can you filter child objects using a parent contraint.
asked
1 answers
1

Martijn,

The Xpath you should use is 

[MyFirstModule.Address_Person/MyFirstModule.Person/Age > 41]

I created the following example to test:

Domain Model

Test Page

Page results (with some data I entered)

Search tab

When I enter an Age in the field in this tab, the following microflow runs to filter the records

Hope that helps,

Mike

answered