- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2020 02:57 PM
We have in a variable set a variable of type "formatter."
We have several other departments that use this application, but this one department in particular wants to hide this option.
Note our business owner wanted the first one hidden as well, but this one was generated automatically by the system.
"When there are 2 or more checkboxes on a Catalog Item / Order Guide, a label named "Options" appears on top of the checkboxes." https://hi.service-now.com/kb_view.do?sysparm_article=KB0679539
I would like to hide this one as well, but going back to the second one it is defined in the variable set.
Anyways, I try to hide this in a UI Policy. When I try to define this in a UI Policy action, the variable name does not show up in the "Variable name" drop-down. As you can see, there is no "formatter" or the name I gave it from the first screen shot.
How do I hide these labels?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 02:57 PM
I finally found a solution, and leaving this here for the next developer who needs it.
In the Catalog UI Policy. In the script tab, use this code...
var doc = this.document ? this.document : document;
var x = doc.getElementsByTagName("label");
for(var i = 0; i < x.length; i++){
if(x[i].textContent == "Options"){
x[i].style.display = "none";
}
}
I even found ways to format the margins, set text color, etc. using JavaScript.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 02:57 PM
I finally found a solution, and leaving this here for the next developer who needs it.
In the Catalog UI Policy. In the script tab, use this code...
var doc = this.document ? this.document : document;
var x = doc.getElementsByTagName("label");
for(var i = 0; i < x.length; i++){
if(x[i].textContent == "Options"){
x[i].style.display = "none";
}
}
I even found ways to format the margins, set text color, etc. using JavaScript.