disable only add function in multi row variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 10:56 PM
Hello All,
is there anyway to hide/disable the Add button in multi-row variable set without restricting the number of rows?
Thanks
Bala

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 11:09 PM
Hi Bala
Try to create the UI Policy on the Catalog Item record, not on the Variable Set record. If you try to create the UI Policy on Variable set, the catalog ui policy actions would show you the available variables; but if you create it on the Catalog Item record you should be able to see the variable set name in the option.
refer the following thread it similar to your question it help you.
If it help mark helpful or correct
Thanks and regards
Anil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2020 11:16 PM
Hi Bala
First Thing you have to achieve this by using Catalog UI Policy.
Catalog UI Policy are different than the UI Policy.
The below link will guide you for the Script
The Below link is Service Now Docs for the Same:-
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2020 01:01 AM
thanks for the response.I have gone through this earlier itself. but that doesn't help since i just have a requirement disable only Add. I still need remove all , edit and remove.
Note: This is scoped application
thanks
Bala

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2020 12:27 PM
To disable only add, you can use max_rows_size property of multirow variable set. Here is how you can do this.
//Add these lines in your onload catalog client script
var my_var = g_form.getField("my_var_set");//use your variable set name here
//The number below indicates after how many rows, the add button to disaable.
//If you want to limit to 5 rows then mention 5 below.
//If you put 0, it will disable Add button without checking the rows.
my_var.max_rows_size = 5;
Mark the comment as a correct answer and also helpful if it helps.