How to retrieve a filtered List of objects on another page?

2
Hi to everyone, I'm still new to Mendix and I don't have any programmers' skills, so I allow myself to ask the following question. I've got 2 different entities, A and B. In my module, A is associated to B. Entity A contains different units that are each planned through the entity B: entity B contains all the months of the year, january, february, etc. For instance, I created a "Planning page" on which the units of A are listed in columns within a data grid of the entity B. So, this page stores the numbers of the entity A in the different months, arranged through a table. The data for the units of A are taken from another page on which all data is mastered. My problem now is the following: I wanted to create a page on which I simply list the units of A, then add a button to every unit which opens the Planning page with already filtered columns of this specific unit. For example, I got the units "Marketing" and "Management" which are planned on the planning page. When clicking on "Marketing", I want to be passed to the planning page which shows me in which months "Marketing" is planned. The same with "Management". By clicking on "Management", I only want to see the already filtered planning of "Management".  Is this possible? I'm not very experienced in xpath and creating microflows, but with a short explanation of the steps I'm sure I can get along with it.  I hope my explanation is clear, please tell me in case it is not. Thanks a lot in advance! Laura   These are my entities: This is the page on which I plan to integrate the redirecting-button to the already filtered list of the planning page: And this page should be shown (by clicking that button) with an already filtered list of all Organisational Units:  
asked
2 answers
2

Hi Laura,

 

If I understand your question correct you want to view a filtered list of items based on a parameter given from the button the user is clicking. If so, you already gave the answer yourself (By clicking on "Management", I only want to see the already filtered planning of "Management". ). Make sure you pass the OrganizationalUnit object when clicking the button to the Planning page as a page parameter. Within this page you can filter the datagrid using a xpath. Check this documentation to find your xpath solution https://docs.mendix.com/refguide/xpath. You can also use ctrl+space within the xpath field to view your xpath options given by Mendix. Hope this helps :)

answered
1

Hi Jeroen,

thank you a lot for the explanation! I created a microflow with the entity "OrganisationalUnit" that shows the page "Planning" by clicking the Button, but when I select "OrganisationalUnit" in the field "Object to pass", an error appears: "The selected page 'Planning' should contain a data view that accepts an object of type 'OrganisationalUnit'."

How can I overcome this problem without changing the structure of the Planning page? I'm sure I'm asking the basics, but I'd be grateful for every further answer.

So, thanks again :)

answered