Skip Navigation

[Resolved] Adding a custom field filter to a view query doesn't work

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 2 replies, has 2 voices.

Last updated by Minesh 1 year, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2778223

I am trying to: to add a custom field filter to a view query (content selection)
The filter is on a Start Date field (type DATE) condition is Greater Then TODAY, produces zero results, but I have data that has events with future start dates, so the result is wrong, therefore not working as excepted.

This is my filter: Select items with field: Start date is a DATE greater than TODAY()

Link to a page where the issue can be seen:
hidden link

I expected to see:
Two events that have the start date set to the future dates.

Instead, I got:
no results.

Also, when I change the custom field filter from Greater Than to Greater Than and Equal to TODAY(), then I get all the results, where there only be 2 events that match this criteria.

#2778261

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Unfortunately - the access details you shared with your first reply is somehow not accessible.

Can you please share bit more details what view you created and on what page?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2778745

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

The thing is that Toolset Types custom date field value stored as Unix Timestamp to database.

So, I've adjusted the query filter for the Event Start Date as given under:

Custom field filter
Select items with field:
Start date is a number greater than or equal NOW()

Can you please confirm it works as expected.

#2778839

Thanks for fixing it, who would have thought that date is a number 🙂

Cheers!