- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2015 12:27 AM
Hi all,
I'm facing curios issue.
I have a container with many variables in my Catalog item form.
I would like to hide this container on RITM and Catalog Task form.
When I'm creating Catalog UI policy with Action (visibility = false) for this container - it does not work.
I also tried to hide container in onload Catalog Client Script (g_form.setDisplay('container_name', false) or g_form.setVisible('container_name', false) - but also does not work.
If I hide another type of variable (like textbox, selectbox...) it works fine, but for container it does not work.
Do you have any ideas what could be wrong?
Is this out-of-the-box behavior that containers cannot be hidden in RITM and Catalog Task forms?
By the way, showing/hiding containers in Catalog Item form works like a charm.... : (
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2015 12:30 AM
Hi Peter,
The below thread should answer your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2015 12:30 AM
Hi Peter,
The below thread should answer your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2015 12:45 AM
Hi Pradeep,
thank you for the link: Is it possible to hide variable container in requested item [sc_req_item] form using a client script...
I found here a workaround for my issue.
As mentioned in the thread, I used:
$j("tr#container_9ff1123284de0a40ac0acf42fd11e5a4").hide();
in onload client script and it works.
I'm not very happy with such "sys_id hardcoding" but for now it's the only workaround I found.
btw, I tried to "google" the answer first, but did not find link above
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 12:14 PM
Hi peter.repan, see if this article helps out with hiding that container (and eliminates hardcoding the sys_id's) via your Catalog client script: Show/Hide Form Section by Name - ServiceNow Guru. There are comments that speak your specific situation, which I've also included below.
How about a script to collapse containers on a catalog form. Not all containers but specific named containers.
Thanks,
phil
Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2020 11:28 PM
Hi Team,
Yes !!!! We can Show/Hide "Container Start" Variable' Display Value for a Catalog Item in Portal.
Note:- I have fixed by Using "UI Policy Script" and "UI Policy Action".
1. Create an UI Policy as per your condition to Show/Hide the "Container Start" field LABEL.
2. Write below Script Together on Script Part-
SCRIPT:-
function onCondition() {
g_form.setDisplay('variables.high_performance_computing_linux_unix_ah', false)// Enter the Value of the Variable.
}
3. Create UI Policy action for the "Container Start" variable and Make below changes
A). Mandatory = FALSE
B). Visible = FALSE.
RESULT:- Now Based on condition. "Container Starts" field Label can be Show/Hide.
************************************************************************************************************************************************************
Example:-
Before Condition Fulfilled- "Container Start" Variable Field Label "High Performance Computing" Can bee seen.
AFTER CONDITION MATCHED:-
"Container Start" Variable Label is HIDDEN-
Important:- "Container End" Variable Should be Just after "Container Start" Order. You May adjust later for other variable with New Container Start but to Achieve this you have to Create 1-1 (Container Starts && Container End).
Joshua Bice 10-12-2014, 08:13
Phil,
I use an onLoad client script with the following message:
toggleVariableSet(");
You can use a var = g_form.getReference("); Then a .sys_id if you need to do it without hardcoding the sys_id.