Hi, I am trying to retrieve the filtered data for the select page with a normal DataGrid. I have pasted the domain model below. The requirement is: I will create a new object A then will select object B. Now, I have to select E objects. I have to show only those E objects which are associated to D object which in-turn is associated to C objects for the selected B objects. The problem is that the “A_E” association is empty whenever a new object is created, and I cannot pass the page parameter or the DataView object to the DataGrid on the Select page because of Mendix limitation. I do not want to use the microflow option. I want to achieve it using XPath only as I do not want to create the work-around for the select button and setting the associations from my side. Please give me a solution or an idea. If this cannot be achieved, please make this as an idea so that Mendix team can update the existing DataGrid and TemplateGrid widgets to take the page parameter/DataView object.
You want to select E objects related to the associated B object of A.
Create a data source microflow.
Retrieve B over association from A.
Retrieve C over association from B.
Retrieve a List of D over the association from C.
Create a list of object E (ERelatedToBList).
Loop over the D list.
For each itterD retrieve a list of E and add to ERelatedToBList
Expose the list ERelatedToBList to the Datagrid
If unclear or you need a visual, add it to the comment.