The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How do i hide variables on a catalog item depending on a selection of another variable.

abcmh
Giga Contributor

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,

31 REPLIES 31

reginabautista
Kilo Sage

Hi you may use Catalog UI policies to accomplish this.



http://wiki.servicenow.com/index.php?title=Service_Catalog_UI_Policy#gsc.tab=0


Thanks Regina. I will take a look at the Catalog UI Policies.


BALAJI40
Mega Sage

write a onChange client script or Ui Policy.


ui policy:


check box field is true


make visibility of those fields true.


client script:


if (g_form.getValue('checkbox_field') =='true'){


g_form.setDisplay('variable_name',true);


else{


g_form.setDisplay('variable_name',true);


}


abcmh
Giga Contributor

Thanks Balaji. I will check out the Catalog UI Policies and client script.