Limiting dropdown lists per join in database
Application Type
Reactive

I am currently developing an educational system that requires a join within the class identification, the class time, the days of the week that those happen, the type of sports and and the maximum of students. So this join occurs in one screen, made by the teacher, where he choses all of those data in a series of dropdown lists. This join should limit the choices of the student as of when he is chosing which classes to take.

As an example, when a student choses to take classes from 9 to 10 pm, the options of sports to chose should be limited by this data.

I am not sure as to how to implement that, because I am new to the platform and I haven't found examples related to this theme

From what I understand you need 2 aggregates, 1 for Estaticos/Horario that will run at start and another one for Dinamicos/Turma that you will run on demand.

After choosing a value from Estaticos/Horario dropdown you will run a screen action that will call Dinamicos/Turma aggregate filtered by the value selected on Estaticos/Horario. This aggregate will populate Dinamicos/Turma dropdown.

Hi Thiago, 

can you show the data model to help finding a solution?

Regards

Hi José, thank you for your time!

Here is the data diagram

Capturadetela20210413155109.png

From what I understand you need 2 aggregates, 1 for Estaticos/Horario that will run at start and another one for Dinamicos/Turma that you will run on demand.

After choosing a value from Estaticos/Horario dropdown you will run a screen action that will call Dinamicos/Turma aggregate filtered by the value selected on Estaticos/Horario. This aggregate will populate Dinamicos/Turma dropdown.

Thank you Jose! I managed to solve it using a couple of SELECT DISTINCT querys and filtering the doubled values!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.