How to get Question Text of Checkboxes and Label type variable in ServiceNow Flow Action

Sayantan Dutta1
Tera Contributor

Hi All,

 

I have received one requirement where I need to get the question text of the Checkboxes and the Label Type of field in Flow Designer. I have attached the image containing the variables below

SayantanDutta1_0-1685609730709.png

I have tried using the following code to get the label in Flow.

 

var internet_lbl = fd_data._1__get_catalog_variables.internet.getLabel();
var all=fd_data._1__get_catalog_variables.all.getLabel();
var aua=fd_data._1__get_catalog_variables.australia_asia.getLabel();
var eur=fd_data._1__get_catalog_variables.europe.getLabel();
var noa=fd_data._1__get_catalog_variables.north_america_canada.getLabel();
var soa=fd_data._1__get_catalog_variables.south_america.getLabel();
 
But this is returning "undefined" for all the values. 
Kindly provide one solution to get the Text of these Label and Checkbox type variables in Flow.
 
Regards,
Sayantan

 

1 REPLY 1

Prinssi
Mega Sage

Hi Sayantan,

 

It is possible that the label of the variable is not included in the returned data from the Get Catalog Variables action.

 

Have you considered doing a lookup of the variables table (item_option_new) to get the labels that way?