Converting a String to An Enumeration

2
What built in mendix function will allow me to convert a String to an enum and also what function will allow me to convert an enum to a type string
asked
1 answers
2

To convert an enum to a string you could use the getCaption function. To convert a string to an enum you can create a variable of type enum and then use if statements to get to the correct value. For example enum with values a,b,c then the variable would look something like this: if <your string=""> = ' a' then Module.Enum.a else if <your string=""> = 'b' then Module.Enum.b else Module.enum.c

I hope this helps you a bit.

answered