Issue Updating a list collector

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 07:29 AM
Hi,
We have a product record with a list collector field that captures one or more systems involved in the product creation.
As part of a decommissioning process we initiate a flow that copies that field and passes it into a list collector variable.
No issues so far.
During decommissioning we may identify additional systems that we didnt know about, and the list variable is updated with these additional systems before closing the task.
Then end goal is to update the product record system list with the revised variable system list.
To achieve this we have the following steps in the flow:
Step 32: Get Catalog Variables // gets the most up to date list of the systems
Step 33: Set Flow Variables // has the following script:
["cbd4004c1bc2d690ef6764a2b24bcb4a","04c1af451b858e503a3840c4e34bcb1d","fa0935cc1b958250ef6764a2b24bcb0c","a215c40c1bc2d690ef6764a2b24bcb55","a1e1af451b858e503a3840c4e34bcb5e"]
However, the System field on the Product Record still only show the original 2 systems.
Can anyone advise how we can update the record with the revised list of 5 systems?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 07:57 AM
Hi @Cirrus ,
Just return listArr.toString();
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 08:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2024 08:12 AM
Hi @Cirrus ,
Make sure these sysids are present on referenced table.
I have checked this code in background script and working fine, it means it will work in flow as well.
var x = ["d64b9bd783095210a9589780deaad3c6","0e826bf03710200044e0bfc8bcbe5d7c"];
var gr = new GlideRecord('incident');
gr.get('3d3acd498371d610a9589780deaad33e');
gr.watch_list = x.toString();
gr.update();
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------