Usage of Reference Selector on a 1-n n-1 relation via Microflow

This is a reformed question to some adaptions in the Mendix project regarding question : Mendix Forum - Question Details . This is not giving me a solution, so I try via another way: See the Domain Model:   I want to assign the OfficerPerGuardDuty to the Occupation. So, an OfficerPerGuardDuty can have multiple Occupation-items. The GuardDuty is 1 object passed via a parameter which is passed through another page. So, the GuardDuty doesn't change in this page. The Officer is to be picked out from the ReferenceSelector. However, I want that the options to pick from, are selected from the available Officers, assigned to the OfficerPerGuardDuty, which is assigned to the GuardDuty. So, every GuardDuty has a limited set of Officers.   I'm transferring the GuardDuty object via a parameter eventually to the page where the Officer has to be selected. I use the GuardDuty as a parameter to Microflow ACT_GetOfficersPerSelectedGuardDuty.      ACT_GetOfficersPerSelectedGuardDuty:      Now, I first Retrieve all Officers that are assigned to the GuardDuty that is given in the parameter. At least, I think I do. This is where I'm stuck. How do I make sure that only the officers from the Retrieve list are returned to the OfficerPerGuardDuty and eventually to the Reference-selector? I used the CreateOfficerPerGuardDuty to pass the object via the EndEvent $NewOffficersPerGuardDuty to the Dataview. I do this because it needs an Object and not a List. Actually, I don't know how to cast the List to an Object. Or is that a complete wrong way to pass the list of Officers thru to the Dataview/Reference-selector?   On this moment I do get the officers in the Reference-selector, however, I get all the officers. I only want the officers that are assigned to the GuardDuty via OfficerPerGuardDuty.    If anyone could point me in the right direction would be helpfull.   Here is the Retrieve:
1 answers

Hi Roy

You can use an XPath constraint under tab ‘Selectable Objects’ in the Renerence set selector to limit the list of Officers

Your XPath constraint should look something like this: