Showing Recurring Dates Only Once in a View

Created on 9 September 2024, 8 months ago

Problem/Motivation

We have a view of events using Smart Dates which attempts to show the next week's upcoming events. Some events are recurring and some are one-off instances. Some of the recurring events occur multiple times in a week, for instance a yoga class that is Monday through Thursday. In our view, we would like to show only the next upcoming occurrence of an event. So for events that happen multiple times in a week it would only show the closest up-coming date. Is this possible to do?

πŸ’¬ Support request
Status

Active

Version

4.1

Component

Smart Date Recur

Created by

πŸ‡ΊπŸ‡ΈUnited States virtualmitra

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

Comments & Activities

  • Issue created by @virtualmitra
  • πŸ‡ΊπŸ‡ΈUnited States virtualmitra
  • πŸ‡ΊπŸ‡ΈUnited States dasginganinja Bethlehem, PA

    In the Views settings you could try turning on DISTINCT? Might be worth a try.

  • πŸ‡¨πŸ‡¦Canada mandclu

    Probably the easiest way to achieve this would be using a view mode instead of fields to display the events instead of fields. Then, in your view mode use the recurring formatter to only show one upcoming instance.

  • πŸ‡ΊπŸ‡ΈUnited States redeight

    I'm facing this issue right now. Multiple field settings > Display all values in the same row, which is how I would fix this with any other field, is not working as expected.

    Event is a two day event. Mon 1-4PM, Tue 1-2PM. The event's smart date field has two entries.

    In the view, with "Display all values in the same row" set, it shows both dates+times in two rows... Both rows show the exact same thing.
    Unchecking it results in two rows, first with Mon 1-4PM, the second with Tue 1-2PM.

    The second is correct behavior, but not useful for my specific use case: listing events people can register for, and you cant register for just one day.
    The first behavior is incorrect. And checking Distinct in the query settings doesn't fix it. How do I fix this?

  • πŸ‡¨πŸ‡¦Canada mandclu

    As suggested in #4, using a view mode instead of fields to display your content is the most reliable way to avoid duplicate display.

Production build 0.71.5 2024