Flow Designer

kirankr2061
Tera Contributor
var operation = fd_data._1__get_catalog_variables.operation.getDisplayValue();
var tofop = fd_data._1__get_catalog_variables.type_of_operation.getDisplayValue();
var action = fd_data._1__get_catalog_variables.action.getDisplayValue();

return "Operation: " + operation + "\n" +
       "Type of Operation: " + tofop + "\n" +
       "Action: " + action + "\n";
 
I am populating variable values in the task description But I am getting
Operation: undefined
Type of Operation: undefined
Action: undefined



Any suggestions
5 REPLIES 5

G Ponsekar
Mega Guru

Hi @kirankr2061 ,

 

Might be you are pulling the variable information from incorrect step in the script. Can you check once

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

var operation = fd_data._1__get_catalog_variables.operation;
if I write this I am getting backend name of the variable I need the display value of the variable;

Hi @kirankr2061 ,

 

Can you try like below which is appropriate

fd_data.trigger.request_item.variables.<variable name>.getDisplayValue();

 

or

 

fd_data.trigger.current.variables.<selectBoxVariable>.getDisplayValue();

 

If you just want to get the variable value, the Get Catalog Variable action should be fine. But if you are trying to get the Display Value, then you will need to use the code I have provided above.

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

Ankur Bawiskar
Tera Patron
Tera Patron

@kirankr2061 

if they are part of MRVS then it won't work.

share the catalog variables screenshots.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader