
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 09:47 PM
I would like to be able to have a user when making a catalog request via the portal to also have an option to add others to the watchlist for that request item.
EG: EA requesting on behalf of an Executive, wants to add their own name to the watch list so they can keep an eye on the request on behalf of the executive, or even just the requester going on leave and wants someone else to be able to see the updates.
I thought it would be as easy as mapping the question to the watchlist field and onsubmit adding those in the field, however this doesn't appear to be as simple as I thought.
Any help would be very much appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 06:56 PM
I have managed to figure this out based on a few people's posts, so feel it best I share my overall solution.
Firstly, thank you to Vishal as your first link was helpful - First Link
I also found the script I needed here and wanted to give credit to Pradeep Sharma for their post
Firstly what I did was created a Variable Set for the watch list, so I could easily add it to any request or record producer that I wanted the ability to have a user add others to the watch list.
In the variable set I created a variable and called it 'add_to_watchlist' - this was set as a List Collector field.
I then created a Business Rule as follows:
Name: (really whatever you like)
Table: Incident [incident] *If you are doing this for a request item the table would need to be Requested Item [sc_req_item]
Active: Selected
Advanced: Selected
When to run Tab
When: before
Order: 100 (really whatever suits you)
Insert: Selected
Update: Selected
Delete: unselected
Query: unselected
Filter Conditions and Role Conditions - leave as default
Actions Tab
Leave as is
Advanced Tab
Condition: Blank
Script:
(function executeRule(current, previous /*null when async*/) {
if(current.variables.add_to_watchlist)
{
current.watch_list = current.variables.add_to_watchlist;
}
})(current, previous);
Then save and add the variable set to the record producer (catalog request if doing a request item)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 09:51 PM
Hi
You can add these selected users in the Workflow attached and then add from Run Script activity there.
What are your thoughts on this?
Let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 10:33 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2018 06:56 PM
I have managed to figure this out based on a few people's posts, so feel it best I share my overall solution.
Firstly, thank you to Vishal as your first link was helpful - First Link
I also found the script I needed here and wanted to give credit to Pradeep Sharma for their post
Firstly what I did was created a Variable Set for the watch list, so I could easily add it to any request or record producer that I wanted the ability to have a user add others to the watch list.
In the variable set I created a variable and called it 'add_to_watchlist' - this was set as a List Collector field.
I then created a Business Rule as follows:
Name: (really whatever you like)
Table: Incident [incident] *If you are doing this for a request item the table would need to be Requested Item [sc_req_item]
Active: Selected
Advanced: Selected
When to run Tab
When: before
Order: 100 (really whatever suits you)
Insert: Selected
Update: Selected
Delete: unselected
Query: unselected
Filter Conditions and Role Conditions - leave as default
Actions Tab
Leave as is
Advanced Tab
Condition: Blank
Script:
(function executeRule(current, previous /*null when async*/) {
if(current.variables.add_to_watchlist)
{
current.watch_list = current.variables.add_to_watchlist;
}
})(current, previous);
Then save and add the variable set to the record producer (catalog request if doing a request item)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 08:23 AM
Thank you for this sound solution! Just note, if you need to be able to remove someone from the watch list after the business rule runs (say someone types in an incorrect email address) you will need to uncheck the "update" box on the business rule otherwise it will just put it back as soon as you save the ticket.
Thanks!
Nate