Example for convertng Enumeration list into string list

On mendix documentation mentioned getKey and getCaption functions for enumerations to string conversion but there is no microfow example given for this. Can anybody guide the steps for Enumeration list to Strings list?
2 answers

Unfortunately, there is no way to create a list of strings in Mendix. You can create a single string with all the enumeration values concatenated i.e. joined. This is fairly straightforward using the create and change variable actions - https://docs.mendix.com/refguide/variable-activities.

Keep in mind Key actually refers to the Name of the enumeration.


Hi Muhammad,

If you create/change a String value, or want to change a String variable using an Enum value, you can use getCaption($YourObject/enumAttribute) or getKey($YourObject/enumAttribute) to get the value. Make sure you check if teh value isn't empty or you'll get an error!

EDIT: Missed a part of your question, but Andrej has it covered!