How to make a multi row variable set read only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 04:12 AM
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?
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 11:40 PM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 05:27 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2021 09:30 AM
Hi Shaileema,
Did you find any solution for this? Could you please share your solution?
Thank you