Forum Academy Marketplace Showcase Pricing Features

Filters Date in Repeating Group

Hi, I’m making an app and I need to filter events by week, that is, only events that are scheduled for the week we are in are shown.

does anyone have a solution?

I’m using a repeating group

Hi there, @lukinhapophack… there is an option called :extract… that enables you to extract the week of the year (1-53) from a given date. So, you could add a constraint to the repeating group’s search that compares the week extracted from an event’s scheduled date to the week extracted from the current date.

However, the problem with what I have suggested above is that I believe it can only be done by using advanced filter, and as you may or may not know, advanced filters can be slow because the filtering happens on the client side. One way to get around the need for an advanced filter would be to extract the week from an event’s scheduled date when the event is created, and store the week in its own field on the Event data type. With that setup in place, you would be able to construct a constraint on the repeating group’s search that looks something like scheduled week = Current date/time:extract week, and you should be good to go.

Hope this helps.


1 Like

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