Multi Row Variable Set - Disable 'Remove All' and 'Delete' functionality (Catalog form)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2019 10:34 AM
Hi,
Has anyone managed disable any of the properties and functionality associated with the new Multi Row Variable Set on the Service Catalog form?
Specifically, I'm trying to disable the 'Remove All' option as well as the delete functionality (x icon per row). Whilst I can achieve this via DOM manipulation, obviously I'm very conscious of the unsupported nature around this.
I've tried setting UI policies for example as well as setting write roles etc, however I'm not having much success using supported approaches. Anyone else tried this?
To provide some background as to the why, we're leveraging the MRVS to present a list of Assets and asset data associated against a user and asking a user to confirm, edit and add data if required. However for anything pre-populated we want to prevent deleting or removing this data. Any data the user choses to add, this could be removed/deleted.
Thanks in advance,
Robbie
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2019 11:22 PM
Hi,
Has anyone managed to find a why to set the multi-row variable set read only?
i'm referring to option to do it after submit ( on the requested item level) and specifically on the platform ( not the service catalog).
Alternatively, if there is a way to identify using a script that someone trying to delete is also would be good to know.
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 03:20 AM
Hi,
If you want to make the multirow variable set readonly, then you can do like this,
g_form.setReadOnly('your_var_set_name',true);
When you make the variable set readonly, the edit and delete icons will be hidden.
If you just want to stop adding further rows after submit of x no. of rows, then you can do like this
your_var_set_name.max_rows_size = 5; //metnion the appropriate numbe or dynamic variable value here
Mark the comment as a correct answer and helpful if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 02:58 AM
hi ,
can you let me know how to achieve it by DOM manipulations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 03:09 AM
Its actually not that hard
Just remember to set "Isolate script" to false in your catalog client script
//Multirow variable set sys_id
var varset_id = '656ee3de1b700410608786e07e4bcb77';
//Remove Add and Remove all
var set = document.getElementById('table_variable_buttons_' + varset_id);
set.style.display = 'none';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 03:28 AM
why don't you simply do this with ui policy? It is easier than doing it with DOM manipulations.