Hide/Disable 'Add', 'Remove All', 'X' buttons on a Multi Row Variable Set

Shiladitya Das1
Tera Contributor

Hi,

 

I've a requirement where a Multi Row Variable Set is auto-populated, but I need the 'Edit' icon (🖋) to be available for an user to edit any row and rest of the buttons/icons ('Add', 'Remove All', 'X') to be disabled or hidden.

 

Is there a way to do this?

 

I've seen one community post and tried using DOM manipulation, but it isn't working.

12 REPLIES 12

The use case the author posted was that a MRVS is being auto-populated, so that's why this solution worked for them.  Another use case applies to viewing/updating on the resultant RITM and or Catalog Task records as an MRVS populated on a request form would load on these other forms already populated.

hey

I have form with hidden MRVS that is shown and fill automatically when choosing value from other variable (list collector).

I used this script on Catalog Client Script On Load- and succeed hiding "add" & "Remove All buttons,

but didn't succeed to hide "x" icon (delete row).

can you help me find the problem? maybe because the MRVS is hidden on Load?

That sounds likely, but then I'm surprised hiding the buttons work.  You could try increasing the timeout, in case the form is taking longer to load, from 2 seconds (2000) to 5 seconds (5000).  You may also need to re-run this script onChange of the list collector variable, so that once populated the row icons are hidden.  Making the MRVS read-only might work for this use case instead. 

"add" & "Remove All" buttons is always shown on MRVS, the icons "edit row" & "delete row" is shown only when add new row. the script running On-Load, so maybe this is the problem?

Is the rows inside MRVS already needed to be on form On-Load?

Just an Addition if you want to remove the Actions name in the header of mrvs
you can add this line

this.document.getElementById("GIVE HERE THE ID OF THE ACTIONS ELEMENT").innerHTML="";