External databases are filtered through dropdown

0
Hi experts, I have a requirement that I have successfully queried by connecting to an external database via databaseconnector. In addition, I set three reference dropdowns. The first one binds all divisions in the dropdown through the external database query, the second one is also site, and the third one is location. For example, if I select a division in the first one, then my second dropdown Only all sites under the first selected division can be queried. How can I achieve this function?
asked
2 answers
0

Hi ErkangHui,

 

I didn’t build a solution like this myself, but I would try the following:

 

I would use non-persistent entities to drive the values of the dropdown widget. Use a marketplace widget like this one https://marketplace.mendix.com/link/component/118916 or another one that you like.

 

After you set the first drop-down, the On-Change event can trigger the query filling the non-persistent entity for the second drop-down, etcetera.

 

Is this the help you are looking for or do you need me to guide you more?

 

Go Make It

answered
0

What you are looking for is Dependant Reference Selector or Dependent DropDown UI/UX. I dont think there is a out of the box marketplace widget for this. So you may have to go custom.
1 idea is: The first RefSelector is the way you have already done, (via Association from the Context object which encloses the RefSelector Entity) the 2nd and the 3rd Can be created with Datasource as a Microflow.
In each of these 2 Microflows you get the Context Object as the Input Parameter, from which you can get the First RefSelector section using the Association and then as the output of these DS MF’s you return only those values which has the selected Division as relationship.

Makes sense? 

answered