Make adding mandatory for a Catalog request

StephanieH04070
Giga Contributor

Hello all,

I have a Catalog request where users need to click on the "Add" button in order to create new CIs.  The Variables, after clicking add, are mandatory but, if they just open the catalog request then click "Order Now", they can submit the empty request.   I need to make adding mandatory or the request can't be submitted.  Any help would be greatly appreciated!

3 REPLIES 3

Brad Bowman
Mega Patron

Hi Stephanie,

If the "Add" button is adding a row to a MRVS, you can use an onSubmit Catalog Client Script like this, that applies to the Catalog Item, not the MRVS:

function onSubmit() {
	if (g_form.getValue('domains_mrvs').length < 3) { //internal MRVS name.  An empty MRVS sometimes returns {}
		alert('You must enter at least 1 SIP Domain!');
		return false;
	}
}

brianlan25
Kilo Patron

You can add a UI policy that make the variable set mandatory. I have one that has multiple variable sets so you may be able to ignore the viable as true.

brianlan25_0-1793721307373.png

 

AshishKM
Kilo Patron

Hi @StephanieH04070 ,

Please confirm, if using MRVS for adding inputs for CI creation request. 

Is this catalog item form for one CI only or using MRVS for multiple CI with the same request. If using MRVS then follow the steps share by @brianlan25 @Brad Bowman .

 

Let us know in case issue not resolve.

 

Thanks,
AshishKM

 

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution