- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 07:51 AM
I am trying to return the label of a catalog variable in flow designer. It seems like no matter what I do, I still get the value of the variable, which is true/false, or undefined. I have tried both items below and cannot get the label. I need to label to input into an action to change from false to true, so I need the label name.
Here are my attempts:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 08:22 AM - edited 12-07-2022 08:23 AM
Hi Brian,
You'll need to define the requested item you are looking for and then use getLabel() to get the variable label. Example here:
var ritmSysId = fd_data.trigger.request_item.sys_id;
var rec = new GlideRecord('sc_req_item');
rec.get(ritmSysId);
var variableLabel = rec.variables.variable_name.getLabel(); //replace "variable_name" with the value of the variable you want the label of
return variableLabel;
For values, you can always use the "Get Catalog Variables" action and drag/drop pills.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 08:22 AM - edited 12-07-2022 08:23 AM
Hi Brian,
You'll need to define the requested item you are looking for and then use getLabel() to get the variable label. Example here:
var ritmSysId = fd_data.trigger.request_item.sys_id;
var rec = new GlideRecord('sc_req_item');
rec.get(ritmSysId);
var variableLabel = rec.variables.variable_name.getLabel(); //replace "variable_name" with the value of the variable you want the label of
return variableLabel;
For values, you can always use the "Get Catalog Variables" action and drag/drop pills.