Limit number of users on watch list?

Jared Wason
Tera Guru

Hi,

How can I limit the number of users that can be added to the watch list on the task table? In testing I was able to put over a 100 users which is way more than needed. I found this article from the servicenowguru site (https://servicenowguru.com/scripting/client-scripts-scripting/limiting-selections-list-collector/) but I was wondering if there is not a way to set this value on the dictionary entry? 

 

Thanks

1 ACCEPTED SOLUTION

Kamil Smusz
Kilo Sage

hi @Jared Wason ,

 

It's possible. You need BEFORE Update Business Rule with below script

KamilSmusz_0-1682070384233.png

 

if(current.watch_list.split(',').length >3){
		gs.addErrorMessage("Watchlist is limited to 2 users");
		current.setAbortAction(true);
	}

 

View solution in original post

1 REPLY 1

Kamil Smusz
Kilo Sage

hi @Jared Wason ,

 

It's possible. You need BEFORE Update Business Rule with below script

KamilSmusz_0-1682070384233.png

 

if(current.watch_list.split(',').length >3){
		gs.addErrorMessage("Watchlist is limited to 2 users");
		current.setAbortAction(true);
	}