- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2015 02:40 PM
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.
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.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 12:29 PM
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";
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2023 05:59 PM - edited ‎02-27-2023 06:00 PM
Neither the above nor the 38 other pages of 5-10 year old answers I found worked in my Tokyo instance. To hopefully save the next poor soul who needs to hide the magnifying glass from blowing an entire day on a line of code:
function onLoad() {
// Array with the reference fields whose magnifying glasses need to be hidden.
// Overkill for a single field.
var fields = ['u_field_1', 'u_field_2'];
// Iterate through the array. getControl().id gets the field's HTML ID string.
// That needs to be prepended with 'lookup.' for the magnifying glass's HTML
// ID string. getElement() then gets the HTMLElement that used to be returned
// by getElementById(). HTMLElement.style.display = 'none' hides the element.
// 'viewr.' is the prefix for the information button.
for (var i = 0; i < fields.length; i++) {
g_form.getElement('lookup.' + g_form.getControl(fields[i]).id).style.display = 'none';
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2023 10:10 AM
Any idea how this can be done for a catalog variable? The above seems to work good on a dictionary but not variables