How to get Question Text of Checkboxes and Label type variable in ServiceNow Flow Action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 02:03 AM
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
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 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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 04:23 PM
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?