- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 10:24 AM
Hello,
I created a catalog item with the following drop down:
Account Type:
Employee
Contractor/Vendor
If Employee is chosen, give a drop down with the following choices for Country:
Mexico
Brazil
if Contractor is chosen, alter the Country choices to the below:
United States
Canada
Mexico
Brazil
How do I do this using a UI policy and without creating a script? Please provide simple instructions. Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 10:31 AM
You can try Onchange catalog client script to make the variables visible only if the ChoiceB is selected
if (g_form.getValue('Variablename') == 'ChoiceB') {
g_form.setVisible('Variablename1', true);
g_form.setVisible('variabename2', true);
} else {
g_form.setVisible('Variablename1', false);
g_form.setVisible('variabename2', false);
}
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 10:31 AM
You can try Onchange catalog client script to make the variables visible only if the ChoiceB is selected
if (g_form.getValue('Variablename') == 'ChoiceB') {
g_form.setVisible('Variablename1', true);
g_form.setVisible('variabename2', true);
} else {
g_form.setVisible('Variablename1', false);
g_form.setVisible('variabename2', false);
}
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************