Hi Stefan Mayer, it's possible you can download the community common module and use "EnumerationFromString" java action, open the java action and change the return type to your enum value and then use it in microflow and pass the string value into it and it will return the matched value from the enum
Hi Stefan,
Marcel Groeneweg has answered this already using Mendix Reflection: https://forum.mendix.com/link/questions/104417
Regards
Thanks @Martijn
Indeed I was able to retrieve all ‘reflected’ Enumerations and their captions.
However my question was not precise.
I actually have a parsed value in String format, with support of MX reflection I can now iterate on the Enumerations. Now I need a Enumeration value (Variable of the Enum type) as a return value. How can I select it dynamically based on the reflection or from the Enumeration.
I’m looking for something like getKey(Enum) but rather like: getEnum(key)
thanks
Thanks @Emad
Yes that is exactly what I was looking for…
Edited the Java file to use my Enumeration Java class and it was all set
For those who don't want to use model reflection or the java action:
This can also be achieved bij wrapping your string list in json and using an import mapping to convert it to a list of enum values