Forum Academy Marketplace Showcase Pricing Features

Repeating Group: Sort by date but start with todays date


I have a list of football matches in my database, on page load, I’d like to display the next set of matches in the future, but allow the user to use ‘next’ and ‘previous’ buttons to look forwards and backwards through the sets of matches.

I have my repeating group ordered by date and I have buttons that work as hoped, the trouble is on page load the repeating group starts with the first set of matches from the earliest date, rather than the next set of matches. I can’t figure out to get the group to start with the next set of matches.

I’d be grateful for any suggestions!



You’ll need to add a constraint in your search to only show matches who’s dates are in the future.

Thanks for taking the time to answer.

Wont ur suggestion break the ‘previous’ button that allows users to click to see matches in the past?

I’ve no idea how your next and previous buttons work - but quite possibly yes, in which case you might need to rethink those.

If it was me, I’d have custom states for the start and end dates to use as constraints in the RG datasource - then the previous and next buttons would adjust those custom state values.

So it depends how you’re doing things regarding your next and previous buttons as to how you need to approach this, but one way or another you’ll need to add a constraint for date if you don’t want to show past matches.