List Field Dependent on another List Field

ican
Tera Contributor

Use Case:

List Field 1 (A, B, C, D)

List Field 2 (1, 2, 3, 4, 5, 6, 7, 😎 - Dependent on List Field 1

If List Field 1 is A then List Field 2 Choices is 1 & 2,

If List Field 1 is B then List Field 2 Choices is 3 & 4,

If List Field 1 is C then List Field 2 Choices is 5 & 6,

If List Field 1 is D then List Field 2 Choices is 7 & 8

 

Thanks in Advance

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ican 

 

Just check the OOTB cat and sub category. 

 

AGLearnNGrow_0-1710327492510.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

M Ismail
Tera Guru

Hi @ican,

you will need to create two choices first let's say List Field 1 with all the choices and 
let's say List Field 2 with all the choices and for the List Field 2 you will have to check the depedent check box to true and in the dropdown you will have to select the List Field 1 

and for creating choices of List field 2 in the depened column you will need to give the value of List Field 1 example 

if List2 Fields are  is 1&2 then they are dependent on List Field value 1.
please also check the below screen taken from sub category on incident table 

MIsmail_0-1710327748732.png


Please hit helpful and accept this as a solution if it solved your problem.
Thank you!

ican
Tera Contributor

This is what I was doing but not working.
This is working for Choice but for List Field it is not working.

Hi @ican,

Then you can create a onChange Client script and then you can use the g_form.addOption or removeOption.