Current Calendar Year prefilter query

SoilentRed

Caaan do!
I'm trying to get a list of submissions that where only made in the year 2017 (this year). I've tried the IS GREAT THAN, IS GREAT THAN OR EQUALS, and Earlier this year conditions, but nothing is producing the results I would expect. I've also tried entering the date in the following formats: YYYY-MM-DD HH:MM:SS and YYYYMMDD. I also tried just writing out the prefilter query, but nothing seems to take. Would you please tell me what I'm doing wrong? Your help is always appreciated.
 
Mr Grits! First of all, thanks for putting work into this. I finally got around to making the changes. For whatever reason, it doesn't seem to want to accept the condition. Fabrik is still returning all the results from previous years.. Attached is what I've entered. Am I doing something wrong?
 

Attachments

  • prefilter-this-year.jpg
    prefilter-this-year.jpg
    26.8 KB · Views: 36
Append &fabrikdebug=1 to your list URL, copy and paste the WHERE part from the getData debug output.

-- hugh
 
Got it to work. had to add a "?"

Here's the WHERE

HERE ( deal_blob.creator_groups = '2,15' OR deal_blob.creator_id = '71646416456' AND YEAR(deal_blob.date_time) = YEAR(NOW()) )
 
Try with Grouped=yes in your AND condition
to get WHERE ( (deal_blob.creator_groups = '2,15' OR deal_blob.creator_id = '71646416456' ) AND YEAR(deal_blob.date_time) = YEAR(NOW()) )
 
It still returns all results
Here's the debug:

WHERE ( deal_blob.creator_groups = '2,15' OR ( deal_blob.creator_id = '418469878941' AND YEAR(deal_blob.date_time) = YEAR(NOW()) ) )
 
ok, then set the Grouped=yes on your 2nd condition

(I don't know where the "grouped" parenthesises are added, it must "group" the OR conditions)
 
Setting grouped should just group it with the previous filter. So if you set it on the second of (say) four prefilters, it should group the first two. Set it on the third, it'll group second and third. Set it on second and third, it'll group the first three.

Sent from my HTC 10 using Tapatalk
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top