How to make a multi row variable set read only?

Shaileema
Giga Contributor

I am using a multi row variable set in a catalog item in which the data gets populated depending on another variable choices. I need the multi row variable set to be read only. I am able to hide the Add and Remove buttons but not the Edit Row and Remove Row icons. Is there any way to do it?

7 REPLIES 7

You can create a catalog client script (onLoad) on the catalog item.

Assuming your variable set is called "mrvs_data" you can use the following code:

g_form.setReadOnly('mrvs_data', true);

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can make it readonly using Catalog UI Policy.

But you need to remove the edit and pencil icon so that user doesn't make any change

That would require DOM manipulation

Refer this blog for same

Disable buttons in MultiRow Variable Set

Regards
Ankur

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

rkreddy
Giga Expert

Hi Shaileema,

Did you find any solution for this?  Could you please share your solution?

Thank you