ServiceNow Agent App - Add to Watch List Function

Jaret Vik
Tera Contributor

Is there a way to add an action item or function to a record screen that allows the adding of users to the Watch List? Do I just make a sys_user reference field input or should it be done another way?

1 REPLY 1

ayushraj7012933
Kilo Guru

 

Hi   @Jaret Vik 

Yes, you can add an “Add to Watch List” function in the Agent App, and the correct approach is to use the OOTB Watch List (Glide List) field, not a single reference field.

Below are the step-by-step instructions 

Best Approach: Use Watch List + Action

🔹 Step 1: Verify Watch List Field

  1. Go to your table (e.g., Incident or custom table)

  2. Check if field watch_list exists

  3. If not:

    • Create a new field:

      • Type: Glide List

      • Reference: sys_user

Step 2: Add Field to Agent Form

  1. Go to:

    • Workspace Experience → Form Layout (or Form Designer)

  2. Add Watch List field to the form

  3. Save and reload

Now users can directly add multiple users

Step 3: Create “Add to Watch List” Action

  1. Go to System Definition → UI Actions

  2. Click New

Configure:

  • Table: your table (e.g., Incident)

  • Name: Add to Watch List

  • Show on: Form / Workspace

  • Action type: Form button

Step 4: Add Script to Append Users

var users = 'sys_id1,sys_id2'; // selected users
current.watch_list = current.watch_list
? current.watch_list + ',' + users
: users;
current.update();
action.setRedirectURL(current);