Constraint selectable objects with a higher reference

0
Hi, In our DM, we have a Course and Instructor, many Instructors are associated with one Course. We also have a Application which many Applications are associated with one Instructor. When creating an Application, we want user to first select Course and then select from Instructors are associated with the selected Course. So far, we couldn’t find a way to do this. Reference selector only allows selecting Instructor. Adding data view or list view doesn’t allow to select as data become not editable.
asked
2 answers
1

Hi Abdullah, 

This could be achieved by navigating to the instructor reference selector, upon opening go to the “Selectable Objects” tab. In this section I would personally recommend using the Xpath method, at the bottom of this section you will see a section that says “Constrained by:” in this section select “edit”. 

Now you will see a list of options based on the relationships amongst your entities, and you should be able to constrain by the previously selected course value. 

Another option, while a bit more involved is to create a microflow as the list source. Essentially you would use a parameter from the given page and then use a split-decision to determine what set of instructors should be displayed. 

 

I hope this helps.

answered
1

You are looking for the constrained by function. For some reason I can not find the Mx8 documentation but this one is still valid: https://docs.mendix.com/refguide7/reference-selector#constrained-by

Regards,

Ronald

 

answered