We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Adding Generic ID in Watch List based on Veriable selection

surajsukuma
Tera Contributor

Based on the Business Unit selection, I am looking for the option to add a Generic Email id to the watch list. Can anyone suggest best practices on the same? 

surajsukuma_0-1721036046313.png

Thanks In advance 

 

1 ACCEPTED SOLUTION

Hi @surajsukuma ,

You can create OnChange catalog client script and select the field as Business Unit. 

Write script like below.

if(newValue!='')
{
g_form.setValue('watch_list_variable_name','test@abc.com');
}

 

Please mark my answer as correct and helpful if it helps to resolve your issue.

Regards,

Namrata

View solution in original post

6 REPLIES 6

Slava Savitsky
Giga Sage

Whether external email addresses can be added to a watch list field or not is controlled by no_email dictionary attribute. See: Hide email addresses in a watch list

I Looking to add value in the WatchList field based on variable selection, 

surajsukuma_0-1721038405942.png

 

Have you tried an onChange client script? Was exactly did not work? To manipulate fields from a client script, you need to use methods of the GlideForm API.

I tried OnChange Client Script Didnt work

surajsukuma_0-1721039882910.png

 

I created BR, its working on the update case, Not working in when create new Request, I need for Insert as well 

surajsukuma_1-1721040000446.pngsurajsukuma_2-1721040023866.png