The CreatorCon Call for Content is officially open! Get started here.

Is there any idea to set a Choice in a Dictionary Entry and have multiple Dependent Values?

MugTm09
Giga Guru

Hello, Everyone.

 

Is there any idea to set a Choice in a Table Dictionary Entry and have multiple Dependent Values?

I want to adjust the Choice items so that the options are shown/hidden.

Unfortunately, OTB only allows you to set one dependent value,

so you cannot make decisions based on complex assumptions.

 

(This item will be displayed on the UI16 standard screen and workspace form screen.)

2 ACCEPTED SOLUTIONS

Nikhil Bajaj9
Tera Sage
Tera Sage

Hi @MugTm09 ,

 

Yes, you can set a choice field to have multiple dependent values in ServiceNow by using a combination of the dictionary entry's "Dependent field" setting and by creating multiple sys_choice records with the same dependent value. For more complex dependencies or dynamic scenarios, a client script with addOption() and removeOption() methods can also be used. 

 

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

ServiceNow Rising Star-2025

View solution in original post

RaghavSh
Kilo Patron

@MugTm09 You are correct at dictionary level you cant have multiple dependent values but you can always use addOptions in client script using complex logic.

 

Refer : https://www.servicenow.com/community/developer-forum/g-form-addoption-on-client-script-used-to-show-... 


Raghav
MVP 2023
LinkedIn

View solution in original post

4 REPLIES 4

Nikhil Bajaj9
Tera Sage
Tera Sage

Hi @MugTm09 ,

 

Yes, you can set a choice field to have multiple dependent values in ServiceNow by using a combination of the dictionary entry's "Dependent field" setting and by creating multiple sys_choice records with the same dependent value. For more complex dependencies or dynamic scenarios, a client script with addOption() and removeOption() methods can also be used. 

 

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

ServiceNow Rising Star-2025

RaghavSh
Kilo Patron

@MugTm09 You are correct at dictionary level you cant have multiple dependent values but you can always use addOptions in client script using complex logic.

 

Refer : https://www.servicenow.com/community/developer-forum/g-form-addoption-on-client-script-used-to-show-... 


Raghav
MVP 2023
LinkedIn

MugTm09
Giga Guru

Thanks, @RaghavSh @Nikhil Bajaj9 

If the parent-child dependency of options can be guaranteed, it is possible to construct different options using "dependent value."
As another method, It is also possible to eliminate the use of dependencies and control it entirely with the OnLoad and OnChange scripts.


Yes if you switch to client script there is no need of using dependencies at dictionary level.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023
LinkedIn