- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 09:53 AM
I am having custom action as shown below which is giving me array of sys Ids.
I am passing the above action out put (the same array) as input to the below subflow.
Inside the flow I am having a create catalog task action where I need to set those array/set of values to additional assignee list. Here you are not seeing the input but in my subflow I have given input.approverList to aditonal asignee list.
But its setting the values as below? how to process them or set them as expected?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 10:05 AM
Do this
1) ensure your output type is string and not array
2) in your script use toString() as in the output I could see same sysId getting added again and again
array.push(user.sys_id.toString());
3) then do this
outputs.arraylist = array.toString();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 10:05 AM
Do this
1) ensure your output type is string and not array
2) in your script use toString() as in the output I could see same sysId getting added again and again
array.push(user.sys_id.toString());
3) then do this
outputs.arraylist = array.toString();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 10:48 AM
for(var i=0; i<inputs.approvallist.length; i++){
var userGr1 = new GlideRecord("sys_user");
userGr1.get(inputs.approvallist[i]);
emails += userGr1.email + ';';
I am taking same array as input to get the corresponding mails but I am not getting them instead I am receiving as undefined or ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; etc.
can you correct me what went wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 08:01 PM
Did my approach worked for setting the additional assignee list field?
Debug in your script if you are getting the sysIds correctly?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader