Add a function ParseToEnum(<String>) - Mendix Forum

Add a function ParseToEnum(<String>)

11

You have a string and want the enumeration. See https://forum.mendix.com/link/questions/102428.

You can create a deadsimple java-action for it, as Bart Rikers suggests, for parsing your string-value to an enum. But we have not become Mendix developers to still need low-code for this kind of simple tasks. Don’t know why this is not part of Mendix since the early days.

Also: this trick is already part of the web-service. Receiving a string for some attribute of type Enumeration, the web-services component handles the conversion.

Hoping to see ParseEnum become part of its colleagues:

 

 

asked
1 answers

Would be nice to have it in Mendix itself (so upvoting). I know that such function is in the “Appronto Common” module.

Created