
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2018 11:12 PM
HI,
Is there anyway to hide the containers based on the choice option selected.
I know it would work using UI policy, but I also tried the same via Catalog client script ('on change'), which didn't help.
Can anyone of you help me out?
#Snippet I used
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var num=g_form.getValue('firewall_no_of_rules');
if(num==2)
{
g_form.setVisible('firewall_rules2',true);
}
else if(num==3)
{
g_form.setVisible('firewall_rules3',true);
}
Thanks
Sailesh
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2018 04:57 PM
Did you ever find an answer for this? I am trying something similar.
I am using this code, and it is not working...
function onLoad() {
var Type = g_form.getValue('variables.BI_ReqType');
alert(Type);
if (Type !== 'Modify Report Distribution')
try {
$("container_31646219dbf317405b9add0b5e9619bc").hide();
} catch(error) {}
if (Type !== 'Create Report')
try {
$("container_12f46a19dbf317405b9add0b5e96191e").hide();
} catch(error) {}
if (Type !== 'Modify Report')
try {
$("container_1a53aa95dbf317405b9add0b5e9619a1").hide();
} catch(error) {}
if (Type !== 'Schedule Report')
try {
$("container_fb46ee19dbf317405b9add0b5e96198d").hide();
} catch(error) {}
if (Type !== 'Publish Report')
try {
$("container_08196e99dbf317405b9add0b5e961982").hide();
} catch(error) {}
if (Type !== 'New Data Request')
try {
$("container_5d41fe11db3717405b9add0b5e961951").hide();
} catch(error) {}
if (Type !== 'Data/Report Question')
try {
$("container_0c42b611db3717405b9add0b5e96197d").hide();
} catch(error) {}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2018 02:11 AM
Hi Rajashekhar,
I'm using Jakarta and know that it wouldn't work out (although I didn't have any mandatory variables inside it)
Hence going for a client script.
Any other suggestion for this is welcome 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2018 04:57 PM
Did you ever find an answer for this? I am trying something similar.
I am using this code, and it is not working...
function onLoad() {
var Type = g_form.getValue('variables.BI_ReqType');
alert(Type);
if (Type !== 'Modify Report Distribution')
try {
$("container_31646219dbf317405b9add0b5e9619bc").hide();
} catch(error) {}
if (Type !== 'Create Report')
try {
$("container_12f46a19dbf317405b9add0b5e96191e").hide();
} catch(error) {}
if (Type !== 'Modify Report')
try {
$("container_1a53aa95dbf317405b9add0b5e9619a1").hide();
} catch(error) {}
if (Type !== 'Schedule Report')
try {
$("container_fb46ee19dbf317405b9add0b5e96198d").hide();
} catch(error) {}
if (Type !== 'Publish Report')
try {
$("container_08196e99dbf317405b9add0b5e961982").hide();
} catch(error) {}
if (Type !== 'New Data Request')
try {
$("container_5d41fe11db3717405b9add0b5e961951").hide();
} catch(error) {}
if (Type !== 'Data/Report Question')
try {
$("container_0c42b611db3717405b9add0b5e96197d").hide();
} catch(error) {}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2018 10:57 AM
Also, if you remove the
alert(Type);
you will not receive the pop up each time the containers collapse.