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 05:19 AM
You can make it readonly by using a catalog client script (e.g. onLoad).
Assuming your variable set is called "mrvs_data" you can use the following code:
g_form.setReadOnly('mrvs_data', true);
Not 100% sure but it should also work with an UI Policy on the Catalog Item and as field you can select the variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 05:26 AM
I tried but this does not help.. i am using a catalog ui policy also but it is still showing the Edit Row and Remove Row Icons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 05:30 AM
Then please use a client script. This definitely works because I´m using it too (and you do not have to remove the pencil icon)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2021 08:30 AM
I tried but it does not show any change in the variable..can you please share how you are using the script?