- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2021 12:35 PM
In previous releases of ServiceNow the List Collector variable in Flow Designer was treated as a comma separated list of sys_ids. This caused some issues with Flow Designer that required using Custom Actions. I have several custom actions that use a List Collector as the input and then look up glide records on the sys_user table for example to generate a list of user's managers. My actions no longer work in Quebec, so it appearrs that list collectors are no longer working as comma separated lists. What type of variable are they treated as in Flow Designer, and how can i parse these lists so that i can iterate over them in my custom actions.
Here is a very simple custom action which works in a flow in Paris, and works when i use the Test function in flow designer in our Development instance which is on Quebec. However when i use this action in a flow in Quebec, the outputs for the action are blank.
(function execute(inputs, outputs) {
var users = inputs.Users.toString().split(',');
var mgr_list = [];
var gr = new GlideRecord('sys_user');
gr.addEncodedQuery('sys_idIN'+users);
gr.query();
while (gr.next()) {
mgr_list.push(gr.manager.getValue('sys_id'));
}
mgr_list = mgr_list.toString();
mgr_list = mgr_list.split(',');
outputs.managers = mgr_list;
})(inputs, outputs);
Here it is used in a flow, and does not successfully return the Manager objects from the inputted users.
Here is the action
Here is a successful execution of the Test function.
Solved! Go to Solution.
- Labels:
-
Upgrades and Patches

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2021 10:46 PM
The issue is identified an a product defect in Quebec release.
PBB# PRB1502254
Workaround: Check below SN Article.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0831321
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0827213
Thanks,
Rohit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2021 09:08 AM
The answer that i got from HI support is that the Catalog List Collector variable has changed and is treated as a GRPRoxy, rather than a string in Quebec. So the issue that i had is my input is not actually a flow designer List variable type, but rather a catalog list collector variable. One frustrating aspect of this is that when i use the Test function within the custom action it returns blank outputs because the input is treated as a string rather than a glide record object. The action works when used within a flow however.
Here is the final working code:
(function execute(inputs, outputs) {
var users = inputs.Users;
var mgr_list = [];
while (users.next()) {
mgr_list.push(users.manager.getValue('sys_id'));
}
outputs.managers = mgr_list;
})(inputs, outputs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2021 01:22 PM
How did you fix this?