Is it possible to build master/slave dropdowns

0
Hi, I am new to Mendix and am trying to build a master/slave drop down. Is this possible? I would like the slave drop down to be hidden or disabled based on changes to the master.  In the example below, when Headquarters is selected, the region should be (empty) and disabled or hidden. When Regional is selected, the region should be enabled. [MASTER] Regional Type:  Headquarters Regional   [SLAVE] Region: (empty) North East South West  
asked
4 answers
0

yes, you can set the visibility based on attribute on region field.

answered
0

Hi Adam, 
That is possible. What you'll need is two attributes (which you have) and two dropdowns: one for the RegionType and one for the Region. You can constrain the latter on the first or use conditional visibility or conditional editability for the second dropdown based on the value of the first. Any validations (i.e. if RegionType = Regional → Region != empty) can be handled in the validations microflow.

 

Good luck,

Yves

answered
0

Adam,

I made a small demo – you can view how it works here:  https://youtu.be/ui6WG_q2QMg

If this is what you want, here is how I created this:

I created 2 enumerations:

 

And added those enumerations as attributes on an entity:

Here is the new/edit page with conditional visibility:

 

And here is the visibility condition on the Region radio button:

Hope that helps,

Mike

answered
0

Very cool. It appears that the Mendix way of doing this is through the control overlay.

I appreciate your taking the time to illustrate this. I will try to implement it.

Thank you!!!

answered