- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 07:38 AM
It's too many to ideally do this manually, could someone point in the right direction scripting wise for removing users from lists while maintaining the other members of the list.
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 07:55 AM
This can definitely be scripted. The watch list is just a comma-separated list with sys_ids and email addresses.
If I were to script this, my first attempt would be to:
- Get the sys_id of the user
- Query table for all records where watch_list contains the sys_id of the user
- For each record
- Convert the watch list to an array
- Remove the sys_id
- Convert array back to string
- Set watch list to new string
- Update record
- Sprinkle in lots of debugging messages along the way
This could probably be optimized, but since it's rarely going to run as a fix-script (my preference) or background script, This can probably be done later.
Please post a status update on how well this turns out.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 07:55 AM
This can definitely be scripted. The watch list is just a comma-separated list with sys_ids and email addresses.
If I were to script this, my first attempt would be to:
- Get the sys_id of the user
- Query table for all records where watch_list contains the sys_id of the user
- For each record
- Convert the watch list to an array
- Remove the sys_id
- Convert array back to string
- Set watch list to new string
- Update record
- Sprinkle in lots of debugging messages along the way
This could probably be optimized, but since it's rarely going to run as a fix-script (my preference) or background script, This can probably be done later.
Please post a status update on how well this turns out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 08:47 AM
Thanks Jarod I will give this a whirl next week and let you know how it goes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 09:56 AM