Hi Rob,
You are correct that tou can't set the value by simply typing 'complete.' The way to reference enumerations is through referencing the enumeration value in the following way through the equation dialogue:
<module>.<enumarationName>.<EnumerationValue>
For example, pretend I had an enumeration 'RegistrationStatus' for my object 'Registration' that lived in my 'Workflow' module. If I wanted to set it to 'Complete,' I would use a change activity on the Status attribute using the following reference:
Workflow.RegistrationStatus.Complete
If you hit 'Ctrl' + 'Space' while using the dialogue box you can find this more easily.
To further get into this, let's look at the use case where you have a String field 'statusString' and want to translate it into an enumeration, you will need some logic in your change activity that looks like this:
if $statusString = 'Complete' then
Workflow.RegistrationStatus.Complete
else if $statusString = 'Not Started' then
Workflow.RegistrationStatus.NotStarted
else if$statusString = 'in progress' then
Workflow.RegistrationStatus.InProgress
Hope this helps!
Rob
Hi VAlerio Guastella,
In your change object you are using object value which is denoted by $. Instead you should use the Enum directly. Type the Enumeration name and you will get your enumeration in the suggestions.
Hope this Helps.
Although I agree with Rob as the best way, you technically could set the value by just setting it equal to string value x, where it would look like RegistrationStatus = 'Complete'. It will work but it is hard coded and if you change the caption values of the enum, this method won't update. So while it works I would use what Rob posted and I just wanted you to be aware of this example.
HI All,
I am trying to execute a similar task. I would like to give a new status to an attribute of an object once a button is clicked. The button will call a microflow where i am using a change object activity. Howver, it doesn’t seem to recognize the status. Can somebody help pls?