- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 07:29 PM
Hi Everyone,
I am trying to add some functionality which adds users to a list through the service portal, however in the Server Script I had used gr.setValue()
Unfortunately this deletes all other entries to the list and replaces it with the one user, what would be the best way to add users without removing previous users?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 10:09 PM
update as this
line 26
arr = gr.u_impacted_users.toString().split(',');
line 28
gr.setValue('u_impacted_users', arr.toString());
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 07:41 PM
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 08:25 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 08:33 PM
do not you getUserdisplay, you want sys_id of the user in 3rd line that you have written.
I am assuming you are also passing the sys_Id of the user to be added to list from portal as well
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 08:41 PM