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

Show warning message on incident table when watch list field is empty from the message table

RJ56
Tera Contributor
 
1 ACCEPTED SOLUTION

vermaamit16
Kilo Patron

Hi @RJ56 

 

Assuming that you want to display a warning before an incident is submitted, you can make use of the On-Submit Client Script on the Incident Table. Please configure it as below :

 

function onSubmit() {
   //Type appropriate comment here, and begin script below
	var watchList = g_form.getValue('watch_list');
	if(watchList){
		return true;
	}
	else{
		g_form.addInfoMessage('Please provide the watch list details to submit !!!');
		return false;
	}
   
}

 

AmitVerma_0-1706099951154.png

 

Thanks & Regards

Amit Verma

Thanks and Regards
Amit Verma

View solution in original post

2 REPLIES 2

vermaamit16
Kilo Patron

Hi @RJ56 

 

Assuming that you want to display a warning before an incident is submitted, you can make use of the On-Submit Client Script on the Incident Table. Please configure it as below :

 

function onSubmit() {
   //Type appropriate comment here, and begin script below
	var watchList = g_form.getValue('watch_list');
	if(watchList){
		return true;
	}
	else{
		g_form.addInfoMessage('Please provide the watch list details to submit !!!');
		return false;
	}
   
}

 

AmitVerma_0-1706099951154.png

 

Thanks & Regards

Amit Verma

Thanks and Regards
Amit Verma

RJ56
Tera Contributor

@vermaamit16 thank you