I am having problem with creating Form for university registration, the entity of the Form is "student_class", where the user will select subject from all subjects list and according to this subject the lookup field of professor field will be reduced only to one's that give this subject, after that he can select the classroom according to his selection of subject and professor, and also time according to last three fields. So the problem I am having that I can't filter professors or classrooms or time record to one associated with specific subject, always they show all the records.
I have tried to create table that holds the values of subject and professor and classroom and time together to associate there values , but I can't use this table to associate subject and other fields to gather in "student_class" entity where the user will see its Form. I have also tried to use events and created lib with js but it only set Values of the lookup field but I didn't find a way to reduce the recordes the user select from, Also I tried the N:N relationships but I can't enter records and associate them together as I need. Please help me, I am new to dynamics and I don't know if I am doing it right or not.