How do i hide variables on a catalog item depending on a selection of another variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:17 PM
I have a Service Catalog item that i am working on . I am adding variables to this item which are checkboxes, radio buttons, multivalue drop down selections, text values, date items etc.
If i select a particular check box like "New Contract" , i need to display a couple of date variables and a comments variable.
What is the best way to achieve this ? Any suggestions?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 09:54 AM
Please post your main catalog item display also. would like to see how your variables looks like at initial load.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 09:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 10:07 AM
I double checked and did not find multiple Ui policies for those fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 10:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 10:08 AM
Hi Amol,
Please use this onChange script,
Write a onChange client script
ncChange of : new Contract
Try this script
script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading ) {
g_form.setDisplay('<fieldname1>',false);
g_form.setDisplay('<fieldname2>',false);
g_form.setDisplay('<fieldname3>',false);
return;
}
if (newValue == 'true'){
g_form.setDisplay('<fieldname1>',true);
g_form.setDisplay('<fieldname2>',true);
g_form.setDisplay('<fieldname3>',true);
}
else{
g_form.setDisplay('<fieldname1>',false);
g_form.setDisplay('<fieldname2>',false);
g_form.setDisplay('<fieldname3>',false);
}
}