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.

On submit client script

arunkumar119909
Tera Contributor

Hi team,

 

Shall I use the setValue in on submit client script.

i have a scenario like, in catalog item there one variable like risk rating data type is select box (High,low,medium)i am getting the risk rating value from the script include that script include i am calling in to  on submit client script, answer i am return to set value to risk rating  one risk rating value is high na i need to restrict the user to submit the form  if risk rating is low or medium na allow to submit the form

1 REPLY 1

Abbas_5
Tera Sage
Tera Sage

Hi @arunkumar119909 ,
Yes, You can use the setValue in the Onsubmit Client Script

var rating = g_form.getValue('risk rating data type');

if(risk rating data type == 'high'){

return true;

}

else{

return false;

}

 

In the script include there must be select a checkbox called client callable if it is unchecked it is called server callable.

 

If it is helpful, please mark it as helpful and accept the correct solution.

Thanks & Regards,

Abbas Shaik