We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to make MRVS particular fields visible in one item , if it is attached to multiple catalogues

singhkritik
Tera Contributor

I have one MRVS, in which there are total 30 fields, which is included in 4 catalogues, Now I have added 10 more fields in the MRVS , but now those 10 fields should be visible in only 1 catalog but not in other three. I tried UI policy on catalog item, but it doesn't shows multi row variable set field to make it hide. What should be the solution for it?

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @singhkritik 

 

Inside the 3 target catalog items , create an onLoad catalog client script with this sample script.

If needed, you can use onChange catalog client script as well.

 

function onLoad()

{

g_form.setDisplay('mrvs_variable_name_1', false);

g_form.setDisplay('mrvs_variable_name_2', false);

// Add all 10 fields you want to hide

}

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Brad Bowman
Mega Patron

The solution for this is a workaround - using separate MRVS.  There is not a way to hide a MRVS variable when the MRVS is displayed on the request form, RITM, or Catalog Task.  The best you can do is hide a variable in the add/edit dialog window via an onLoad Catalog Client script that applies to the variable set, not the catalog item, so in your scenario you would also need to determine which Catalog Item is spawning the dialog window to only hide the variable(s) for 3 of the 4 Catalog Items.