Get the key and value from a dropdown when processing the dialog


I have a dropdown that is dynamic and based on a generated key-value list. When processing the dialog, I only get the selected key in the dialog back. I’d like to also get the value and I have no clue where to find it. I’ve inspected the $evm.root, $evm.current and $evm.parent objects but I have not found the value (or the entire key-value list, which would also work for me).

Tips, even incomplete would be very much appreciated.

Thank you,


@dclarizio can you review this question from @phmo and forward to a SME if necessary.

@eclarizio, can you help out here? Thx, Dan

@phmo, I think you can get the full key/value hash by doing $evm.attributes[‘name_of_your_dialog_field’][‘values’]

@gmccullough Does that sound right?

@eclarizio, $evm doesn’t seem to have the variable attributes. I get the following error:
NoMethodError: undefined method `attributes’ for #MiqAeMethodService::MiqAeService:0x00000004eb8df0

I’ve also tried $evm.root[‘project’][‘values’], but that seems to be empty/Nil

If I check $evm.instance_variables, I get [[at]uri, [at]ref] (with [at] the @ sign, because the forum thinks @ indicates a user)

I’m using cloudforms version, so maybe that’s why the attributes variable doesn’t exist yet?

I’m rather new to ruby in general, so if there is something else I could check, let me know.

Hi @phmo,

Currently the only item passed to automate from the dynamic field is the key as you already discovered.

I would suggest opening an issue and we can look into passing the other items (value, full key/value pairs) that you are interested in.

Ok done, issue created at: