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-26-2017 12:32 PM
Please mark this as correct and helpful if it resolve your query. So that this thread could be marked as answered.
Please refer the ink below.
How To Mark Answers Correct From Community Inbox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:30 PM
This can be accomplish this by using UI-policies.
1. Create a new UI-policy
2. Specify the conditions
3. Create new UI Policy Actions (specify Mandatory/Visible/Read only)
For more info ...http://wiki.servicenow.com/index.php?title=Service_Catalog_UI_Policy#gsc.tab=0
Thanks
Madhu
PS: Hit Like/Helpful if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 01:42 PM
one thing to add to this...
UI policies are by far the best method of hiding a variable on a catalog item... if you ARE hiding a varaible it is a REALLY good idea to check the run scripts box.. and in in the
"execute if false" block put in a script to clear the value from the field you are hiding IE "g_form.clearValue('variableName');
this way if the variable is taken off the form AFTER they have filled it in the value gets cleared out <users do silly things>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2019 02:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2017 09:02 AM
Thanks for everyone's input . I have tried the suggestions but haven't been able to achieve the desired result.
So here is what i have done.
I have a checkbox item called "New Contract". If i check "New Contract" then i want to Contract Start Date , End Date and Comments fields to display.
If its unchecked the 3 fields should be hidden.
So i created a new Catalog UI Policy for the "New Contract" item with then Condition as it should be True.
Then i created a New UI Policy actions for the 3 items Contract Start Date, End Date and Comments. All the 3 were set to
Mandatory - True , Visible - True & Read Only - Read Alone.
However when i TryIt and the 3 fields are displayed all the time where as i just want to display them when i check the "New COntract" check box.
What am i doing wrong?