Selectable Enumeration values?

0
Lets say that I have a form with multiple fields with enumerations. In the first field I select an enumeration value. Depending on the enumeration value I select in the first field, the second field with another enumeration dropdown should show only a few of its enumeration values and not all. In other words, I am looking if I can have selectable enumeration values.
asked
4 answers
2

Dear Brio Joseph,

This issue bothering me for a while. I am currently working on a set of widgets; reference selector, reference set selector, and enum selector based on the choisen lib http://harvesthq.github.io/chosen/

The enum selector is going to have the feature you are requesting for,

Not sure when I be able to finish the widgets. But Ill keep you posted.

Kind regards, Andries

answered
1

Hi Brio,

This cannot be achieved with enumeration fields. You will have to use the reference selector for this. Please read this article to understand how it works:

https://world.mendix.com/display/refguide5/Reference+selector

Focus extra on the "Constrained by" paragraph

answered
1

While awaiting for another great add on widget from Andries, I can describe how I have tackled this issue.

In my app, I want to use enumerations for the control they provide over page display and microflow routing and execution. I also want to have conditional display of certain enumeration values based on the selection of other enumeration values. To meet both of these requirements, I have used a hybrid solution. I set up the enumerations as required by my application, then defined an entity to contain the valid combinations of enumerations.

For instance, lets say for a restaurant we have a customer type enumeration with two values: dine in and carry out. Then, we have an menu item enumeration to containing the following values: pizza, pasta and salad. To limit carry out customers to pizza and salad, we could create an entity with two attributes, customer type and menu item, pointing to the respective enumerations. In my app, I can add three objects to this entity for dine in customers and two for carry out. Then I can use enumerations in combination with references to restrict what is displayed on a given page.

Not the most elegant solution, but maybe it will help you out.

answered
0

Dear Brio Joseph,

This issue bothering me for a while. I am currently working on a set of widgets; reference selector, reference set selector, and enum selector based on the choisen lib http://harvesthq.github.io/chosen/

The enum selector is going to have the feature you are requesting for, Nut sure when I be able to finish the widgets. But Ill keep you posted.

Kind regards, Andries

answered