How to filter information of one data grid based on an attribute selected on a different page
Hi, I am now learning how to use the Mendix Modeler and I am trying to create a rather simple app which helps a person create appointments for patients. Therefore I have created several consecutive pages where one has to select the name of the patient, then on the next page,the room, on the next the name of the doctor, and on the next one the date and time of the appointment and the last one is a review of all of the selected info. The room entity contains a Specialization attribute which I would like to use to filter the doctors after on the next page. So if I select room 1 with the Specialization attribute Orthopedics , the next page with the doctor selection should only show the doctors with this kind of specialization. ( The doctors entity also has a Specialization attribute ) What would be the best way to do this? (Please let me know if any further info would help) Your help will be much appreciated. Many thanks and kind regards, Razvan.
How are you 'linking' the entities? You could filter your Doctor datagrid on [Specialization = Doctor_Room/Room/Specialization] if that's how they are connected?
Using xpath you can make sure only Doctors that match your requirement (specialization in this example) appear. You can read up on xpath here (https://docs.mendix.com/refguide/xpath)
Did I understand your question correctly?
Wieke Bouten - TimeSeries
The easiest way to achieve this with Mendix is to wrap your data grid in a data view.
Your data view should be associated to the object that you want to filter on (see my screenshot)
Then use the special token [%CurrentObject%] in the Xpath constraint.