Toolbox: decision for enumeration - Mendix Forum

Toolbox: decision for enumeration

1

I sometimes have enumerations with many values (>20) in that case I need to use a decision and then for every value I need to (at least) draw a flow, select the value for that flow and add an end-event

 

It would be nice to have a seperate toolbox item to add a decision for a enumeration (let us call it enumeration-decision)

When using this I would expect a selection-page for the wanted enumeration and after ok that the system then creates a decision with as caption the enumeration-name and for every possible value of that enumeration a flow with an end-event.

 

 

asked
2 answers

Yes I know but as far as I know it is recommended, to be sure that all possible values of the enumeration are covered, that you have a flow for every possible value of that enumeration.

 

Now I need to forsee this all manually and this can be a huge job if the enumeration has many values.

 

Example: not complete because in this enumeration we have > 90 possible values (I know I can solve this in some other way but sometimes it would be handy that the system just generates this automatically and then I can add the wanted other behaviour)

image.png

Created

You can already do

$Objectname/Enumeration = Module.EnumerationName.EnumerationValue

 

e.g.

 

$Customer/Type = Customer.ENUM_CustomerType.Gold

This will give a true or false and you can continue from there. Add more if needed.

You could also combine it with A or B or C etc

Created