Show comment based on the master id

0
I want to asking about master detail configuration on mendix. I just create two entities called TSchool and TComment. TComment is used to show all comment based on the id of a school. Assumed I clicked a school with id SCH001, so in the edit data it will show a datagrid as the detail which show all comment for SCH001. But in my case, all of comment is shown such as SCH002, SCH003, etc when I clicked the edit data of SCH001. So how to config this pattern of master detail? Can we just using database as data source or we must call a microflow?
asked
1 answers
0

Hi Fadil,

In your case you should use a one-to-many association between TSchool and TComment. If you do already, you can place a Data view widget on the page where you select a school, set data source as Listen to widget (like a data grid for TSchool), and put a Data grid inside the Data view that uses data source association.

See these documentation links: https://docs.mendix.com/refguide/associations/ https://docs.mendix.com/refguide/listen-to-grid-source/

Hope this helps!
If you have any further questions please feel free to ask!

Best of luck,
András

answered