Possible to filter in Views by specific recurrence instance?

Created on 1 November 2023, over 1 year ago

I have a content type with a Smart Date field that allows recurrence. In my View, I want to show only that content where the first date is in the future, i.e. no instances of the event have happened yet.

The "start" filter would seem to do that, but it is the start of each recurring date instance, not the start of the whole set. So it will just show all instances of the event in the future, even if there are some past instances.

Is there any way to filter in Views on a specific recurrence instance, e.g. the first or last? I can do this in Twig template for the view, but then you run into caching issues, and I guess you can disable caching for a particular template, but it would be nicer to be able to do it in the view itself.

Apologies if this has been answered somewhere, but I can't find it if so.

💬 Support request
Status

Active

Version

3.7

Component

Smart Date Recur

Created by

🇨🇦Canada plousia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @plousia
  • 🇨🇦Canada mandclu

    Interesting use case. When I first read the description, I thought maybe core could do this, but I don't believe so, after a little testing.

    There is the ability to use aggregation, but it seems as though once you enable aggregation on a filter (e.g. to use "minimum") it is no longer able to evaluate relative dates for comparison.

    I found a couple of modules that might be useful for reference: Views Filters Extras and Views Filter Last Delta . The latter sounds like it does the opposite of what you want, but if you end up having to write something custom, could be good reference.

  • 🇨🇦Canada plousia

    Thanks for replying. I'll check into the modules you reference. I'm a frontend dev so don't muck around too much with module coding, but maybe Last Delta could provide a starting point for writing something.

Production build 0.71.5 2024