The CreatorCon Call for Content is officially open! Get started here.

If any catalog item variable is empty in order guide user should not submit the request.

ServicenowDev19
Tera Contributor

I have a order guide which has 3 catalog items and each catalog items has 1 variable.

I want to restrict user from submitting the request if any of the catalog item variable is empty.

I want to achieve this without making any variable mandatory.How to achieve this?Can anyone help?

2 REPLIES 2

Vishal Birajdar
Giga Sage

@ServicenowDev19 

 

Can you try onSubmit client script on each catalog item.

 

var test =g_form.getValue("variable_name");

 

if(test ==''){

return false;

}

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

this is working only when we are on that catalog item in order guide but if that variable is empty and if we go to next catalog item then it is not working.