Skip Navigation

[Resolved] Filtering a view based on a repeating field

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 1 voice.

Last updated by Saul Baizman 1 hour, 17 minutes ago.

Assisted by: Minesh.

Author
Posts
#2844463
Query Filter view setting.png
Session Dates custom field.png

Hi there,

(This question is related to this other question: https://toolset.com/forums/topic/sorting-the-posts-in-a-view-based-on-a-repeating-field/.)

We have a custom post type named "Event." It contains a custom field, "Session Dates," a date field which accepts multiple values. See "Session Dates custom field.png" for the field's definition.

We have a view named "Upcoming Events." We want to display a list of Event custom posts whose *first* value of the "Session Dates" custom field is on or after today's date. We know we need to add a Query Filter in the View, but we don't know how to specify the first value of the "Session Dates" custom field. See "Query Filter view setting.png" for the query filter definition; ignore the part of the filter with "Field - wpcf-event-date-and-start-time" since that section will be removed. Can you offer some guidance?

Thank you.

Saul

#2844564

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked and I found that when you have repeating field it will comparre all the repeating field entry rather than the first one.

You can deside first what approach you want to go with as I shared with your another ticket:
- https://toolset.com/forums/topic/sorting-the-posts-in-a-view-based-on-a-repeating-field/#post-2844563

Then we can decide what could be the possible solution here.

#2844612

Minesh,

Thanks for your response. Since we're using a dedicated field with a single value, this question is no longer relevant. I know how to add the proper query filter.

Thanks again.

Saul