Dropdown programmed always returns 0 instead of the text entry


Good morning, everyone,

I just created a form in which I put dropdowns. I created an instance and a method for each and by programming, the first one filled the second one. That works, but when I want to get the selected values back, I get a value of 0 (zero) instead of the displayed value. However much I turn it in all directions, I only get 0.

If I do a debug like $evm.log(:info, "value is : #{$evm.root[‘dialog_name_dropdown’]}), normaly, I should be receive a text value, but instead I receive the 0 number.

Do you have an idea for the solution. Do we need to refresh the cache and if so how can we do that?

Thank you for your help.


Can you post the code, that sets the value for the dropdown?

Dropdown values are a key/value pair. The key is the actual value passed to Automate and the value is a human readable description displayed to the user.

When are you trying to read the value back? Is it while loading another dynamic element in the same Dialog? After you clicked submit in the StateMachine?

Have you tried ObjectWalker to debug the problem?


Check the type of the field in the dialog definition.

There is a choice between string and integer (“Value type” field), and I believe it would behave like you’re describing when set to integers but filled with strings.



I didn’t even think to go check on the type.

A big thank you.