Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81254

How do I set the value of an enum attribute when creating / changing an object?

$
0
0

I'd like to use enums for the values of finite fields (e.g. status = {'not started', 'in progress', 'complete'}. I have figured out that I access the value as a string through getCaption, but how do I set a value?

When I create an object witn an enum attribute, I may want to set it's value in the microflow; same for a process that may wish to change it.

I can't put 'complete' or 1 into the Value box as it expects something of type enum. Seems like there should be a getEnumByCaption type of function.

I'm hoping that the answer is not to write one microflow for each enum that accepts a string parameter and then iterates through the enum to find the correct one...


Viewing all articles
Browse latest Browse all 81254

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>