How to make A variable dependent on another variable in service catalog.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 09:30 PM
How to make the following variable dependent.
When I selected Desktop then canon dt 101,canon dt 102 should be displayed ,
When i selected Floortop then canon ft 101, canon ft 102 should be displayed.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 09:37 PM
Hi,
since both are drop down you will have to write onChange client script on 1st and accordingly show/hide the options using g_form.removeOption() and g_form.addOption()
Removing or Disabling Choice List Options
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 02:12 AM
Not sure if the latter answer was marked correct mistakenly.
I provided the similar approach of adding/removing options.
Thank you for marking my response as helpful.
If my response helped you please mark it correct to close the question so that it benefits future readers as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2022 11:34 PM
Thank you for marking my response as helpful.
If my response helped you please mark it correct to close the question so that it benefits future readers as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 09:37 PM
You can use UI policy here, where in Run scripts you use addOption and removeOption to show the options dynamically.
In the UI policy set the condition filter accordingly.
Syntax:
g_form.addOption("variable_Name",value,displayValue);
g_form.removeOption("variable_Name",value);
Thanks,
Murthy
Murthy