ENUM should have Caption, Key AND Value (such as decimal value or string...) - Mendix Forum

ENUM should have Caption, Key AND Value (such as decimal value or string...)

0

I am barely missing an explicit value for ENUMs.

 

So having an ENUM with captions 1%, 2%, 3% and keys such as _1_0_, _2_0_ and _3_0_ need in addition values such as decimal values 0,01, 0,02, 0,03 and so on.

 

With getCaption you get the Caption - solved

With getKey you get the internal keys - solved

AND

With getValue you get the value of the ENUM such as 0,01 in my example above - open

 

And ENUM filter activity on top would be genious ;-)

 

Thanks,

Timo

asked
2 answers

Sure,  e.g. you have a list and want to filter this list based on the ENUM value (here e.g. 0,01) or do a retrieve and want more than equal/no equal comparison to an ENUM field. 

 

I as a loggedin user

Want to filter a list of  objects (list operation/filter activity - expression editor) by the ENUM value within a microflow/nanoflow

So that the result is a filtered list of objects that meet or comes closest to the value given in the ENUM.

 

Expression Editor:

$currentObject/decimalValue <= $currentObject/enumSelectedValue

 

The reason to choose ENUM is to have static values mostly used in drop-downs. Problem ist that the value of a ENUM can actually not be attached to the ENUM, only captions and internal keys.

 

Also within retrieve XPath commands you can only use ENUM as comparison equal or not equal burt not use it´s value with > < specially for int, dec or lng fields.

 

 

Created

What do you exactly mean with "filter activity". Can you explain or give an example?

Created