MultiRow Variable Set

William08
Tera Contributor

Hi all,

 

 Need a help, so in MRVS, when I click on 'edit row'

William08_0-1694509939085.jpeg

 

the equipment action should by default get set to 'Remove' 

 

2) when I choose 'Add' - the equipment action should by default get set to 'Add' 

William08_1-1694509939087.jpeg

 

 

3) when the 'x' cross mark is chosen, the equipment action should by default get set to 'Remove' instead it should not remove the row

William08_2-1694509939088.jpeg

 

the equipment action variable - 

William08_3-1694509939090.jpeg

 

- this is the requirement

 

Thanks in adavance

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@William08 

Responses inline

1) when I click on 'edit row' the equipment action should by default get set to 'Remove'

-> you should use onLoad catalog client script on MRVS and detect if the variables already have value; if yes then set the value to Remove

2) when I choose 'Add' - the equipment action should by default get set to 'Add' 

-> check this link on how to detect the Add/Remove button and then handle your logic

MRVS detect when a row is removed or deleted 

3) when the 'x' cross mark is chosen, the equipment action should by default get set to 'Remove' instead it should not remove the row

-> as soon as you click x row will get removed; that OOB behavior

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

Hi @Ankur Bawiskar ,

 

Could you please let me know how to hide that remove icon (x) beside the pencil icon from actions

 

 

Thanks

@William08 

check this

Disable buttons in MultiRow Variable Set 

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 

 

i used below script but it is not working on native and it is not working on ritm. Could you please help.

function onLoad() {

    var sheets = this.document.styleSheets;
    var sheet = sheets[0];
    sheet.insertRule('a.fa-close { display: none !important; }');
}