How to remove option if the value is not dependent for that choice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 01:35 AM - edited 01-31-2024 01:36 AM
Hi Team,
having an requirement where XYZ choice field is extended from choice table and having specific dependent values
but when from XYZ value selected then ABC (extended from choice table) field should show only depended value of selected and other options should remove.
How to achieve this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 04:06 AM
Good day!
You could try to use a client script to remove options. Here are some helpful guides...
GlideForm | ServiceNow Developers
Solved: g_form.removeOption for setting choices in a selec... - ServiceNow Community
Solved: Removing Option from the Choice list - ServiceNow Community
For what you're doing, it sounds like you'd want an onChange catalog client script. If this has helped you, please mark it as the solution!
Kind regards,
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 04:25 AM - edited 02-01-2024 08:56 PM
it is on change client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 08:21 AM
Are you able to provide a little more context on where you are running the code above please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 08:35 PM
on resolution code table when changing resolution domain Resolution action should show dependent value but it is showing all values