Need to put validation on submit request

TejasviR
Tera Contributor

Hello Everyone!

I have a query, I want to put validation on submit button whenever the user clicks on submit on catalog form I need to check that software details are available on the table or not if yes then return true or return false.

 

Thanks in advance

1 ACCEPTED SOLUTION

var ga = new GlideAjax('HelloWorld');  //this is your script include name
ga.addParam('sysparm_name', 'helloWorld');   //this is your function in script include
ga.addParam('sysparm_user_name', "Bob"); //parameter being passed
ga.getXML(HelloWorldParse);
 
function HelloWorldParse(response) {
  var answer = response.responseXML.documentElement.getAttribute("answer");
  alert(answer); } //you cvan return true/false from script include which will be recieved here.
-Anurag

View solution in original post

6 REPLIES 6

var ga = new GlideAjax('HelloWorld');  //this is your script include name
ga.addParam('sysparm_name', 'helloWorld');   //this is your function in script include
ga.addParam('sysparm_user_name', "Bob"); //parameter being passed
ga.getXML(HelloWorldParse);
 
function HelloWorldParse(response) {
  var answer = response.responseXML.documentElement.getAttribute("answer");
  alert(answer); } //you cvan return true/false from script include which will be recieved here.
-Anurag

ersureshbe
Giga Sage
Giga Sage

Hi,

I'm not understood clearly. You are submitting the request in Service Portal using catalog item and you have a field/variable called 'Software' and You are looking the field should be mandate to submit the catalog item.

If yes, you can make the field as mandate using catalog UI Policies.

Please mark as correct answer if it helped.

Regards,

Suresh.

Regards,
Suresh.