- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2025 06:40 AM - edited ‎03-06-2025 06:44 AM
Hi,
A list collector field is added to Parent and child tickets.
Related tickets from multiple sub tasks are getting added to parent. When two or more sub tasks having same related ticket it is getting duplicated and adding multiple times in parent related task field. How to restrict adding of ticket if that ticket already added to parent related ticket list field.
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 07:57 AM
just before adding the values use arrayUtil unique method to remove duplicates and then set the field value
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-13-2025 12:58 PM
Hello @Ankur Bawiskar
I can restrict the adding of duplicate values. but It also removing the existing values in the field and adding only the values that are coming from the target fields. how to add the target fields data without removing the existing one. I am using the following script.