How to change the options for pickers based on other columns data


I have two columns, class and teacher.
Class A and Class B have different teachers assigned to each.
I have also two pickers to select class and teacher.
If I choose Class A in the first picker, I want my second picker to show options of teachers only assigned to Class A not whole teacher list.
How can I have this function?

You should be able to filter in this case using Screen Values


Is there any way to use a screen value in screen? or can we have another way to filter in in a screen mode?

I got it by myself.
I made two tables for 1st choice option and 2nd choice option and relate them.
Thanks, anyway!!