How to stop duplicates caused by date range in views

eg flag

On my site I have a content type called Course. Courses can have several sessions. To display these sessions I am using the date range.

When a course has more than one date range entered an instance appears in the view for each start date.

How do I only display one instance for each course? There is only one course, even though there are multiple sessions.

The Distinct option in Query settings doesn't resolve this, nor does using Aggregation

beltouche avatar
cn flag
It would help if you included a screenshot or some other representation of your current Views set up.
eg flag

I've found an answer to this.

To only display the first instance of each Course I needed to add a new filter to the view for field_date_range:delta and change the Operator to Is equal to Value 0.

Each Course session date range is assigned a delta number in the database. This new filter makes sure that only the first one is displayed in a view. What does Delta mean in Drupal

enter image description here


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.