How to remove option if the value is not dependent for that choice

shweta14
Tera Contributor

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 ? 

5 REPLIES 5

bradleydebono
Mega Guru

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

 

 

it is on change client script

Are you able to provide a little more context on where you are running the code above please? 

on resolution code table when changing resolution domain Resolution action should show dependent value but it is showing all values