- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 01:56 AM
Hello Team
I have requirement on catalog item to hide the choice in multiple choice variable based on other variable.
When I select the "call meeting check box" ' IT ' has to hide from the Multiple choice.
Please find below screen shot for more details.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 02:20 AM
Hi @vinod9 ,
First of all change the type of 'Please select the choices ' to select box. As removeOption method is not working for multiple choices type.
After that :
catalog UI policy:-
Script :-
if True :-
function onCondition() {
g_form.removeOption('please_select_the_choice','it');
}
If False:-
function onCondition() {
g_form.addOption('please_select_the_choice', 'it','IT','1');
}
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 02:20 AM
Hi @vinod9 ,
First of all change the type of 'Please select the choices ' to select box. As removeOption method is not working for multiple choices type.
After that :
catalog UI policy:-
Script :-
if True :-
function onCondition() {
g_form.removeOption('please_select_the_choice','it');
}
If False:-
function onCondition() {
g_form.addOption('please_select_the_choice', 'it','IT','1');
}
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 02:34 AM
Thank you so much 🙂 @Gunjan Kiratkar