How can I remove information icon from a reference variable in portal.

sruthi22
Tera Contributor

Hi community,

We have a requirement where information icon ('i' icon) should not be visible on portal for a particular reference variable.

find_real_file.png

In the above image, I should remove 'i' icon only from 'product variable (which is a part of variable set). 'i' icon for 'install base' variable should be as usual. Is this feasible. If yes, could anyone please explain the steps by which the requirement can be implemented?

 

Thanks in advance,

sruthi.

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi, 

you can go the CSS way as follows:

 

find_real_file.png

  1. Open Browser Developer Tools via F12
  2. Use the element selector and click on icon
  3. In the elements tab locate and copy the value of the HTML attribute from SPAN tag two levels above BUTTON tag

 

find_real_file.png

  1. Hold SHIFT and right click anywhere on the page
  2. Click on "Instance in Page Editor

 

find_real_file.png

  1. In the CSS field add the above CSS code (replace "sp_formfield_reference_hiring_manager" with your ID value)
  2. Save and then reload portal page

View solution in original post

8 REPLIES 8

Pranav Bhagat
Kilo Sage

Hi,

you can create a onload client script and hide it this way:

 

var variableName = 'name of reference variable';


var id = g_form.getControl(variableName ).id;


$(id + 'LINK').hide();

You can also use a dictionary attribute

ref_decoration_disabled

find_real_file.png

 

 

Reference Doc : https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/reference-pages/concept/c_DictionaryAttributes.html

Regards

Pranav

@sruthi , Did you tried using dictionary attribute as its a easiest way which requires no scripting  

Hello.

Does the ref_decoration_disabled attribute work in variables?

I'm trying that approach but I'm having no results.

Is neccessary to add anything more to Variables attributes besides ref_decoration_disabled?

 

Thank you!

@Pranav Bhagat - I am trying to remove the reference icon going the client script route. What should I put in my script where you have "LINK"?