Get Enum field value by entity instance, attribute name

0
I am trying to find a way to get the CAPTION of a enum value in java of a object. I am trying to imagine a function: getEnumCaption('EnumName', 'enumnamevalue') return caption All I have is, the object instance(Imendixobject) where a field lies which is of type MendixEnum(i know already or using instanceof i can filter) I tried the below forum post but ended up getting only 'names'of the ENUM rather than the 'captions'! https://community.mendix.com/link/questions/22652 Also in Jaspers response here: https://community.mendix.com/link/questions/510 there is no such method as getValue for MendixEnum. I am in version 6.10.12. Any guesses? (FYI: i have a workaround solution for this by wrting a if else block and then in the matching block call out the Enum By name. But that is not future proof)    
asked
2 answers
1

I think your answer can be found here. You will need to supply a language string, but you can easily add that as a parameter to your Java action, and retrieve the user's language in your microflow.

answered
1

What about parseValueToString

-Andrej

answered