Can I remove the Reference "( i )" icon from a "Choice" reference field WITHOUT DOM manipulation?

Tim Woodruff
Mega Guru

Seems like pretty basic functionality, but I can find documentation only on how to do almost anything with a reference field/icon, EXCEPT remove the icon.

What I have is a "choice" field that's actually a reference field because it's pulling choices from another table besides sys_choice.

The problem is, the reference icon shows up, and is confusing for my users.

avnPiTB.png

OTHER than DOM manipulation (since this has to go into the Service Portal), is there anything I can do? I've spent hours trying to find anything I can on it, but no luck.

8 REPLIES 8

DrewW
Mega Sage
Mega Sage

The only way I ever found was DOM manipulation.   You could put the script to do it in a UI Macro and then add the macro to the attributes of the field so you do not have to try and have a client onLoad script.


Thanks, You had awesome idea to use "UI Macro"

ui macro:

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

<script>
     var elmID = "element."+"${ref}";  
     var elmDiv = document.getElementById(elmID);
     elmDiv.getElementsByClassName("form-field-addons")[0].style.display="none";
</script>
</j:jelly>

and set attribute on field

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

The attribute "ref_decoration_disabled=true" works on normal field like this:

find_real_file.png

 

 But I have sadly never gotten it to work on catalog item variables which it seems that you are looking for here.

 

//Göran

Thanks, a ton!! I have been to so many posts for this. I follow you on Youtube too!!!