How do I filter a Reference Set based on a field with no relationship to my Data View entity?

0
Employees have a *:1 relationship to Office. Offices have a *:1 relationship to regions. To make selecting an office easier, I'd like to have a dropdown of Regions that you could select from so that you'd then only see the related offices. For example, if I'm in the Northwest region, I pick that and then see only offices from the Northwest region. I know that I can do this by creating a *:1 relationship between Employee and Region; however, I feel like this is bad design. It fundamentally allows an employee to have a relationship to Region that is different than the relationship between Office and Region (i.e. the proper relationship). I can say "just ignore that relationship except for lookups" but it still feels wrong. Any idea on how to accomplish this? I could probably open some other form to allow the selection / filtering, but I don't feel like that's not a great user experience.
asked
2 answers
0

Have you tried using a reference selector with source as microflow?

When you add a reference selector to a dataview,  go to properties (set the attribute) then go to the third tab (selectable objects)  > Choose source to be microflow. 

Now in this microflow you can return the list that you want, and that will populate the drop down. 

answered
0

Hi Rob,

A really great, but not well marketed feature is the contrained by option on reference selectors.

Constrained by gives you options that are more limiting than pure XPath but are  updated in realtime. And this might be exactly what you need.

Lets assume that you have a page: Employee_Edit where users first enter the region and then the office.

If you constrain the office to follow a path to the current exmployees region than the options in this reference selector will automatically update based on the selected region. See my screenshot

Hope this helps,

Andrej

answered