Reference Selector Values Populate Depending on Another Reference Selector in Same Data View

0
I have a form where the user will create a session (see below). The form has a reference selector to pick an available program (also see below) and a host (the host will be a zoom meeting host, see below) however only people associated with the selected program will be allowed as host.  The association is correct because when I retrieve users, I get all users instead of just the ones that associated with the selected program (I assume this is because session is an empty object when it comes in) . How would I go about populating the list but with only hosts that are of the selected program type? There is a “Selectable Objects” tab where I can set constraints but since it is a value I am referencing from a reference selector instead of a “hard coded” value, I would need to have the constraint (for a database or XPath) value be a variable or pass the returned list to the second reference selector (which I have found no way of doing). Reference selectors do not have a “Listen to Widget” data source. I tried setting the on change event to save (thinking it might update the current object and allow for options specific to widget but that didn’t work. Also tried the event set to calling a microflow to get the data however that data would go no where since the second reference selector does not know of that data. I am thinking maybe build a JavaScript action and add a nanoflow but I think I might run into the same issue. How would I go about setting up that widget to accomplish this task?
asked
1 answers
2

Hi Jonathan,

I create a simple example as follows:

Domain Model

Overview Page

Session New Edit Page

In the Host reference selector, I selected the following Constrained by

I then populated this with the following data:

And when I open the Session_NewEdit page, it doesn’t show any Hosts until a program is selected.  Once a program is selected, it shows only the ProgramRepresentatives associated with the selected Program.

Let me know if you have any questions.

Mike

answered