Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to disable Add and Remove All buttons from Multirow variable set of catalog item ?

Deepika61
Tera Contributor

Hi All,

 

Actually I want to disable  disable "Add and Remove All " buttons from Multirow variable set of catalog item 

 

Please help me achieve this

 

Thanks

Deepika

1 ACCEPTED SOLUTION

@Deepika61 

this link has the solution

Disable buttons in MultiRow Variable Set 

How to disable "Remove all" button on the Multi Row Variable set in service portal ? 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

4 REPLIES 4

ritu_saluja
Tera Expert

Hello Deepika

 

You can simply create a catalog UI policy on your catalog item and under scripts add these 2 lines of code.

var my_var = g_form.getField("my_var_set");//use your variable set name here
    g_form.setReadOnly('my_var_set',true);

Hi Ritu,

Thanks for the response

But if i want to disable only "remove All " button, what is the code for that?

 

Thanks

Deepika

@Deepika61 

this link has the solution

Disable buttons in MultiRow Variable Set 

How to disable "Remove all" button on the Multi Row Variable set in service portal ? 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepika61 

if you disable then how user will add/remove?

what's your business requirement?

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