Filtering a repeating group by events within a date range

Has anyone had experience filtering a repeating group by a number of events in a select date range?

I’m building a leaderboard for a social platform that ranks tops users by the amount of posts they’ve published in the past 7 days.

I’m able to use a date range filter, however it seems to be displaying any user who has published a post in the past 7 days - not ranking them by the number of posts published.

Would appreciate any insights.

So it looks like what you’re doing isn’t searching for published posts within the past 7 days, rather you’re searching for Users created within the last 7 days. What I would do is create a data type ‘Post’ with the field “User” which would be the user that posted said post and add the field “Posts within 7 days” or whatever you want to call it which would be a number. Then, when a new post is created, I would also set current user’s “Posts within 7 days” to search for 'post’s with the constraint User=Current User and another constraint created date < current date +7 days. Finally, for the repeating group I would just sort by “Posts within 7 days”
These pictures will much more clearly show what I mean.
1


3

2 Likes

Looks to have worked well!

Thank for the in-depth explanation, really appreciate it!

No problem! Happy to help and share tips as I learn with everyone else.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.