How to hide specific variables from RITM Preview Icon catalog task table

sivanagalakshmi
Tera Contributor

Hello,

I was wondering if someone knew how to hide specific variables from RITM Preview Icon through a TASK?

sivanagalakshmi_0-1681215920585.png

 

 

6 REPLIES 6

sushantmalsure
Mega Sage
Mega Sage

Hello @sivanagalakshmi 

Do you want to hide variables from RITM or fields from RITM?

If fields from RITM then you can configure that from sys_popup view

details: https://docs.servicenow.com/bundle/utah-platform-administration/page/administer/field-administration...

If its about just hiding variables from RITM then I think I will suggest you hide the preview option itself on task for RITM because in order to satisfy this you will need to put efforts in client script DOM manipulations (not a recommended approach) . 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Thanks for response @sushantmalsure 

 

I want hide some variables not fields , can you help how hide the preview option on task for RITM on role based

 

Try this

  1. Go to the table that the reference field points to (the 'sc_req_item' table for example) and open the form view for any record.

  2. Right-click on the list header, and choose Configure->Form Layout.

  3. In the "Form view and section" area, select the View name drop-down list.

  4. In this list, look for sys_popup.

    You might need to create it if you don’t have it.

  5. In the slushbucket, remove the variables you want to hide from the Selected list.

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

There is no straightforward way to do this.

If you want this then you will have to write onLoad() and locate the element of the variable.

I have tried on my PDI:

sushantmalsure_0-1681222628820.png

 

In above case I tried hiding variable 'Please Specify an operating system'

I created onLoad() catalog client script which will run only for catalog task and isolate script set to false and added following:

document.getElementById('element.ni.VE3c0ee58307062110cdb1f16c7c1ed01b_read_only').hide()

Now you have to get your variables elementID and replace it above and then test

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure