Based on assignment group in incident form add or remove option

Gillerla Rajesh
Tera Contributor

If assignment group is null means remove the option and if not null means add option the state field I tried this code but not working

 

Any one help me here

4 REPLIES 4

Danish Bhairag2
Tera Sage

Hi @Gillerla Rajesh ,

 

Which code u tried?

Can u share the same. Will be easy to guide

 

Thanks,

Danish

 

Client script

On change of assignment group

 

  1. So here when assignment group is empty means remove the assigned option in n state field else addoption to state field as assigned 

On change of assignment group is working (if have value) filed  as working but  // have value means

 

But on change of assignment group is not working (don't have value) not working // don't have value means 

SanjivMeher
Mega Patron
Mega Patron

You need to create a client script to clear the options. Below blog should help you, how you can remove options or add options depending on the value in another field. For further help, you should provide the code you are referring to.

https://servicenowguru.com/scripting/client-scripts-scripting/removing-disabling-choice-list-options...


Please mark this response as correct or helpful if it assisted you with your question.

here we are adding addoption so it will just showing in the form not adding in database, so when I am hinding time it will searching in database so not getting exact result,

 

If required ment is when assignment group is empty means add option assigned if not empty means remove that assigned option