- 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 09:50 PM
- 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 10:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-27-2022 08:33 PM
I could see you marked my response as correct earlier and now it is not.
Would you mind marking my response as correct since my script worked for you.
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-27-2022 08:37 PM
Sorry Ankur, I had just changed it to the finished script in case anyone else was searching for the answer for the full script.
I changed it back now.
