- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2016 04:15 PM
Hi Guys,
I have got a requirement where I need to hide variables from displaying on sc_req_item form. The requirement are as follows:
- Hide all variables from displaying from some catalog items on Request Item (sc_req_item) form
- Hide some variables from displaying from some catalog items on Request Item (sc_req_item) form
Could you please suggest on how I can achieve this? I am new to the product so please be detailed in your answers.
Thank you,
Mussie
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 06:02 PM
Hi Mussie,
You can use variable set for your variables.
Then you can hide the variable set using g_form.setDisplay('variable_set_name',false); in the catalog client script
Don't Forget to tick the applies to requested items.
Thanks,
Tadz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 06:25 AM
Put a container start and end around the variables and then hide or show the container. It will then hide/show all the variables within it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 01:45 PM
Thanks Francis,
I tried the following and none of them worked:
function onLoad() {
if (g_form.getValue('cat_item') == 'a3a616826f8721000ad98bc44b3ee462'){
g_form.setDisplay('variables.cont_var_start',false);
}
}
function onLoad() {
if (g_form.getValue('cat_item') == 'a3a616826f8721000ad98bc44b3ee462'){
try {
$("container_a3a616826f8721000ad98bc44b3ee462").hide();
} catch(error) {}
}
}
Mussie

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 06:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 07:21 PM
I think this should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 07:24 PM
Thanks guys, I will try and let you know. The problem I have is, I have got more than 80 variables without a variable set and this is a bit tedious but I will try by adding few variables to a variable set and check and if it works then I will proceed with the rest.
Mussie