- 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-23-2021 06:01 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2021 08:24 AM
Hi,
Sorry, I'm not sure what you mean as I'm using a list collector referencing the sys_user table...and that doesn't pass user objects, list collectors or lists type fields in general...pass an array of sys_ids, not "user objects".
As stated above, I created a catalog item, with just a list collector variable on it:
And when you say passing...I don't know if you mean "pass in" or "pass out"...so lets say input or output so we're on the same page.
Please review my setup as I tried to replicate what you're doing:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2021 09:33 AM
The runtime value of your Users variable is different than mine. To me yours appears as a comma separated list of sys_ids as strings, or array of sys_ids as strings.
The runtime value of my Users variable is not a sys_id, it is a user's name.
It looks to me like a complex User Object or a user record, rather than a sys_id as a string.
I added a log step to my Action:
When I run the Test function on the Action, it works and i see this in the logs:
But when i run the Test function on Flow that includes that action, the action does not work and i see this in the logs:
So this appears to me that in Quebec Flow Designer is not handling the output of the List Collector variable as a list of comma separated sys_id strings.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2021 10:08 PM
With regards to List and testing custom actions, I have a custom action where I get unexpected results testing the action with the test inputs, but after publishing the action and using it as part of a Flow, it worked as expected.
The only difference I can see is that when testing the action, my List is just shown as a CSV string, but when to run as part of the flow, they show as the GR references.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2021 06:11 AM
Hi,
Please have a look on below blog
Using list collector in Flow Designer 'For Each loop' by converting string into array of string
After upgrade to Orlando you need to use
Output type as Array.Object instead of Array.String
But post Quebec upgrade the issue was fixed
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader