How to disable or hide the reference icon before every record in a specific list view?

Ma_ April Rais1
Kilo Contributor

Hello Everyone

Is there a way to disable or hide the reference icon find_real_file.png before every record in a specific list view?

I'm using database views for my list view since I needed to show columns from multiple tables, and my request no. is already linked to the request form so I would like to just hide the reference icon or disable it if possible.

Your suggestions would be much appreciated.

Thanks

11 REPLIES 11

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi April,



You may find the below thread helpful.


How to disable hover icon?


There are 2 ways you can  


Ankur Bawiskar
Tera Patron
Tera Patron

Hi April,



There is one way, but that is a workaround.


Follow the steps


1) create a UI script with name of your choice


2) Add following code and that's it - remember to change the table name from u_sample_table to your table



(function() {


  addAfterPageLoadedEvent(function () {


  if((window.location.href.indexOf('u_sample_table_list') != -1))){


  hideRefIcons();


  }


  });


})();




function hideRefIcons(){


  $j('a[class="btn btn-icon table-btn-lg icon-info list_popup"').each(function() {


  $j(this).css("display", "none");


  });


  }



3) what it does is it hides the reference icon besides specific table when you open the list layout for that table.



Screenshot below after adding the ui script



ref-icon-list-layout.JPG



Mark my reply as Correct and also hit Like and Helpful if you find my response worthy.


Thanks


Ankur


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

Hi Ankur,



Thanks for your response, I've already tried to implement the same in my personal instance, but I can't seem to get the same result as what your screenshot is showing, I still have my reference icon showing.



Could please advice on what might I've done wrong here.



(function() {


  addAfterPageLoadedEvent(function () {


  if((window.location.href.indexOf('u_tableabc_list') != -1)){


  hideRefIcons();


  }


  });


})();




function hideRefIcons(){


  $j('a[class="btn btn-icon table-btn-lg icon-info list_popup"').each(function() {


  $j(this).css("display", "none");


  });


  }



find_real_file.png



Thanks


Hi April,



Just check whether you have jQuery library loaded in your instance.It should be present in UI Scripts. Since this functionality is using jQuery selectors.


Also check the class for the anchor tag which contains the ref icons i.e. You can determine it using inspect element in your browser


class="btn btn-icon table-btn-lg icon-info list_popup



I have added the screenshot below.



dom-ref-icons.jpg



Mark my reply as Correct and also hit Like and Helpful if you find my response worthy.


Thanks


Ankur


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