Efficiently Listing Latest Entry Grouped by Users – Seeking Advice

0
Hello, I have designed a dashboard for an application I'm developing on the Mendix platform, which displays the daily moods of team members. My goal is to be able to list the latest mood recorded by each user during the day. I do not know how to create this list using XPath and I suspect that it might not be possible. I am considering using microflows to first pull all daily records into a list and then find the latest entry made by each user for that day through a loop. However, while this method may be suitable for a small number of records like my project, it could lead to serious performance issues when dealing with millions of records. While I could perform this operation much more easily with an SQL query, I observe that the low-code platform complicates this simple process. I wonder if there is a more effective way to accomplish this process in Mendix? Can anyone with experience or suggestions in this area share their thoughts? Thank you!
asked
1 answers
1

You could store which mood is the latest, e.g. by adding a 1-1 association between teammember and mood, that you update each time a teammember fills their moodform.

The retrieval of all the latest moods should be really simple then 

answered