How to set users to watch list automatically when choose certain category

AbdulAzeez
Mega Guru

Hello Everyone,

I have a requirement whenever i select a category of "Network" in incident table i must auto-populate 2 users name like user#1 , user#2 in watch list

Please help me out how to achieve this

1 ACCEPTED SOLUTION

Hi Abdul, IN client script use


var a = "sys_idof user1" + ","+ "sys_id of user 2";


g_form.setValue("watch_list", a)


View solution in original post

21 REPLIES 21

Hi Abdul,



That BR wont run for the other condition. But do you want the watchlist to become empty when Category changes from Network to some other, then write a onchange Client script of category as



if(newValue != "network"){


g_form.setValue("watch_list","");


}



This will make the Watchlist field empty.



let me know in case you have any query


Hi Abdul,



Instead of hard coding sys_id's of users use property and store the users sys_id's there call it in the script.


Hi Abdul,



If your question is answered , please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.


Sneha i marked it as Correct.


Well you can still mark the correct answer by changing the discussion to a question



dan.bruhn, You help will be much appreciated here.



Thank You


Please Hit Like, Helpful or Correct depending on the impact of response