- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2020 01:41 PM
I have values in a list collector and some of the values contain commas. For example, Bugs Bunny, MD or Looney Tunes Practice, PLLC.
I have been able to get a script working that uses the DIsplay Value from the list collector. I use the names to call a custom table to get more information for the catalog task. Splitting the values is a problem for those that have commas as part of their name.
I have tried to get the sysids instead and have had no luck. I used the following
var cdonna = fd_data.trigger.request_item.variables.ci_practices;
and it returns
cdonna = com.glide.vars2.Variable@d2697e
Ankur Bawiskar helped me tremendously in identifying what I needed to access the variables. I am hoping that there is something special that is needed in FLow Designer to access the sysids.
Thanks for any information you can provide.
Solved! Go to Solution.
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2020 04:26 PM
Hi Donnadavis,
I am assuming you are trying to get sysId value after the step Get Catalog variable action. If yes then replace fd_data.trigger.request_item.variables.ci_practices; with
type fd_data. in the script editor and you will get option to select get catalog variable set ->Select that->After that type (dot i.e .) and you will see the variable and select that
Reference ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 09:09 PM
Hi,
you will have to query and get the value
var sysId = fd_data.trigger.current.sys_id;
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', sysId);
gr.query();
if(gr.next()){
return gr.variables.teams_members.getDisplayValue();
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 09:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 09:29 PM
try this
var sysId = fd_data.trigger.request_item.sys_id;
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 09:49 PM
Posting the final code here for others
var sysId = fd_data.trigger.request_item.sys_id;
var gr = new GlideRecord('sc_req_item'); // Table that I am query
gr.addQuery('sys_id', sysId);
gr.query();
if(gr.next()){
return gr.variables.teams_members.getDisplayValue(); //teams_members is the name of my variable
}