How can I remove the magnifying glass and Info pop up on a reference field?

chris_choi
Giga Contributor

Hello Community,

I saw this question asked a few times on the community, and each have very different answers and solutions, all of which I was not able to make work myself unfortunately.

Ref icon.png
As shown above, when a user enters in a name (caller_id) that reference's the user table the magnifying glass and the Info Pop up icons appear. The problem we are having is this is being shown on an ipad through safari as a sign in sheet for a walk up service desk and the searching interface is not really something we want our users to accidentally click (has been a reoccurring problem). Please also note that there is no Security concerns here, so editing ACL's will not be an issue, we just simply want to make our users' lives easier by not having a giant search results box appears if they happen to click on the icons.

Any suggestions are greatly appreciated. Thanks.

1 ACCEPTED SOLUTION

chris_choi
Giga Contributor

If anyone was interested, ServiceNow provided a client script that took care of this.




function onLoad() {


//Type appropriate comment here, and begin script below


//Hide the magnifyling glass


var nameID = g_form.getControl('caller_id').id;


var theSelector = "a[id*=" + '"lookup.' + nameID + '"]';


var d = document.querySelector(theSelector);


d.style.display = "none";



//Hide the info icon


var test = document.getElementById('view.sys_user');


test.style.display = "none";


}


View solution in original post

6 REPLIES 6

chris_choi
Giga Contributor

If anyone was interested, ServiceNow provided a client script that took care of this.




function onLoad() {


//Type appropriate comment here, and begin script below


//Hide the magnifyling glass


var nameID = g_form.getControl('caller_id').id;


var theSelector = "a[id*=" + '"lookup.' + nameID + '"]';


var d = document.querySelector(theSelector);


d.style.display = "none";



//Hide the info icon


var test = document.getElementById('view.sys_user');


test.style.display = "none";


}


sathish_k
ServiceNow Employee
ServiceNow Employee

I tried this script and its working good in classic ui form. But can you tell me how to do this in workspace ui form as above code is not working for workspace ui?

john_duchock
Kilo Guru

Thanks Chris...this saved me a ton of headache !!


himabindu_b02
Kilo Contributor

This is not working after Activating List V3 plugin.