How to create interdependent dropdown

0
Team, I have three dropdowns named dropdown1, dropdown2, and dropdown3. I'd like to implement the following behavior: Case 1: Before selecting an option in dropdown1, users should not be able to interact with dropdown2 and dropdown3. If they try to do so, we need to display a message asking them to select an option from dropdown1 first. Case 2: Based on the value selected in dropdown1, the options in dropdown2 should change. For instance: If dropdown1 value is "Number": then dropdown2 values should be 1, 2, 3, 4. If dropdown1 value is "Letter": then dropdown2 values should be A, B, C, D. Could someone please guide me on how to achieve this functionality in Mendix?   Thanks in Advance
asked
2 answers
0

Use a enumeration for Dropdown1 and conditional visibility or conditonal editability for dropdown2 & 3 based on the value of dropdown1. Use a Microflow Datasource for Dropdown 2 and return the options in a list (Non Persistent Objects). Use an Onchange microflow on dropdown1 to refresh the context and trigger the DS microflow.

answered
0

Hi Venkatajalapathy P,

 

You can create Master tables and link the tables with the help of associations and then in your Reference selector, you can make use of Constrained by in the Selectable objects section.

 

Based on your case: 

 

Create 2 tables. Store the values of Dropdown 2 in Table 2 and Dropdown 1 in Table 1. Associate table 2 with table 1 (one-many associations).

 

Then, in your form, you can use the Constrained by option in the Reference selector Drop down.

 

Please find this forum question for your reference Link: https://community.mendix.com/link/space/xpath/questions/116679

ATB!!

answered