Skip Navigation

[Resolved] Filtering view dosent work

This thread is resolved. Here is a description of the problem and solution.

Problem: The Query Filter doesn't seem to be working correctly when using a URL parameter.

Solution: Make sure to configure the Query Filter to support a URL parameter, not a Constant.

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by stuartm-2 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1359111
Capture.PNG

I have a view that gives me the results of only project that have approval field 1. But when i add a select drop down filter to filter based on what kind of project it is which is number dosent work.

#1359197

Hello could you tell me what you mean "doesn't work"? Is there an error displayed? Are the results incorrect? If you think the results are incorrect, please show me one post in wp-admin that is not displayed in the results but should be included.

#1359425

Would you like to login and see for yourself?

The query retrieves all jobs that have value 1 which is ok.
After that when i click the filter button to filter based on what kind of project it is, it refreshes and shows all results again.

#1359685

I can see that you have "OR" selected in the comparison field. The View should return all results with a value of 1 in the approval custom field, OR, the selected filter value in the "kind of project" field. If the visitor does not select anything in the "kind of project" filter, all results will be displayed (approval = 1 OR second field = anything). If that's what you're talking about, then the filter is behaving correctly. You could change this behavior by choosing "AND" instead of "OR" in the Query Filter panel. If I'm still misunderstanding, please provide login credentials here in the private reply fields, and let me know where I can see this view on the front-end of your site.

#1361683
Screen Shot 2019-10-14 at 5.56.31 PM.png

I think the Kind of Project filter was set up incorrectly. Instead of "Constant", you should use "URL parameter". When you use "Constant", it is literally testing if the value of the field is "wpv-wpcf-kind-of-project". That will never be the case, since it's a number field 🙂
Please check again and let me know if it's not working as expected.

#1363319

I see! I didnt know that. Thanks a lot Christian as always amazing support.