Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

RJ56
Tera Contributor
 
1 ACCEPTED SOLUTION

Amit Verma
Kilo Patron
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


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

2 REPLIES 2

Amit Verma
Kilo Patron
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


Please mark this response as correct and helpful if it assisted you with your question.

RJ56
Tera Contributor

@Amit Verma thank you