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

Making a multi row variable set mandatory?

snow_beginner
Mega Guru

Hi,

Is there a way to make a multi row variable set mandatory?

 

Recently I had the requirement to make a planned outage date variable where up to 7 dates can be added. I have done that using a mutli row variable set with start and end date/time variables and its working well.

 

The only problem is that this question on the form is not mandatory and the user can skip it. Is there a way to make this question that is the multi row variable set mandatory? Thanks.

2 ACCEPTED SOLUTIONS

J Siva
Kilo Patron
Kilo Patron

Hi @snow_beginner 

Yes, you can make the MRVS mandatory using catalog UI policy (Catalog item). PFB

JSiva_0-1746529433300.png

JSiva_1-1746529452594.png

Regards,
Siva

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@snow_beginner 

you can use Catalog UI policy for this as shared by @J Siva 

OR

You can use onLoad catalog client script which Applies to Catalog Item and make it mandatory

function onLoad(){
g_form.setMandatory("mrvsVariableSetName", true);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

J Siva
Kilo Patron
Kilo Patron

Hi @snow_beginner 

Yes, you can make the MRVS mandatory using catalog UI policy (Catalog item). PFB

JSiva_0-1746529433300.png

JSiva_1-1746529452594.png

Regards,
Siva

hi @J Siva thanks so much. Such a simple yet smart solution!

Ankur Bawiskar
Tera Patron
Tera Patron

@snow_beginner 

you can use Catalog UI policy for this as shared by @J Siva 

OR

You can use onLoad catalog client script which Applies to Catalog Item and make it mandatory

function onLoad(){
g_form.setMandatory("mrvsVariableSetName", true);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks @Ankur Bawiskar I have implemented the UI policy solution, but this would also work.