How to properly get value from variable used in a catalog item?

ericgilmore
Tera Guru

Created a service catalog item, with multiple variables.

Created a workflow with a notification activity that sends email upon form submission.

Used variables from the catalog item in the notification (advance, message) field via ${current.variables.var_name} which seems to do what I needed,

until, I realized that one variable, a Selectbox was sending the "text" attribute and not the actual "value" associated with the Selectbox item.

i.e. sending time{ 3:00 AM } text,   instead of time{ 03 } value

Is it a simple matter of adding a dot reference to traverse, i.e. ${current.variables.var_name.getValue()}

Or is that too simple.

--Thanks in advance

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Try



${current.variables.var_name.getDisplayValue()}


View solution in original post

8 REPLIES 8

Kalaiarasan Pus
Giga Sage

Try



${current.variables.var_name.getDisplayValue()}


I'm sorry Kalai, but that didn't work.


I'll do some more searching. I'm sure I'm not the only one to run into this.


You want to get the label of the current value of select box?


No not the label, but the actual value associated with the selectbox option that is selected. In this case it's a selectbox that displays a list of times {1:00 AM, 2:00AM, 3:00 AM, etc.} that has the associated values {01, 02, 03, ... }



When I use ${current.variable.var_name} I get the 1:00 AM etc. But not the 01 value of the selected option. I want to know how to get the 01 value instead.