Is it possible to hide variable container in requested item [sc_req_item] form using a client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2013 07:00 AM
With Service Catalog requested item I've tried different ways to hide the container in the requested item form but none of my attempts have worked. I seem to be able to hide other variables but I am having problems finding a way to hide containers. I would like to show/hide them based on specific criteria. Would anyone know the trick to hiding containers in a requested item form?
Syntax that I've tried:
g_form.setDisplay('variables.container name',false);
g_form.setVisible('variables.container name',false);
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2013 08:08 AM
After submitting I see that it removed some of my syntax. I want to clarify the syntax I used.
g_form.setDisplay('variables.container_name',false);
g_form.setVisible('variables.container_name',false);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2013 01:04 PM
You need to find out the sys_id of the container and then use:
try {
$("container_03c0169ccd8bf800d16dbf12db4aa87b").hide();
} catch(error) {}
Replace "03c0169ccd8bf800d16dbf12db4aa87b" with the sys_id of your Container Start variable.
The Protoype JavaScript library is included in the platform.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2013 01:22 PM
Oh thank you so much .... this works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2013 07:48 AM
i tried using the container syntax provided above it doesn't works in IE Browser it works fine in firefox and chrome.
Can anyone please help.
Best Regards,
Namrata Jain