Pre-filter using NOW() no longer working with Fabrik 3.8.1

Status
Not open for further replies.

stevenpryer

Steven Pryer
I've recently upgraded Fabrik to 3.8.1 (via GitHub) and I've found that the following List pre-filters don't work as expected.

I want to create a pre-filter based on a date field, specifically to show records where the value for a date field is 'Greater than' today (i.e. in the future). Previously I could use NOW() or CURDATE() in the Value field for the WHERE join, but now they don't seem to work. If I replace NOW() with 2018-03-02 then all works as expected.

Any help would be much appreciated :)
 
There has been indeed changes regarding dates in pre-filtering, but NOW() should work. just make sure you use "no quotes" as type when using NOW().
 
This is a slightly different request, but do you know what type I should use for single dates? And indeed what format those dates can be in? I've tried the following but can't quite get the combination with the different types right:
  • "2018-02-01 00:00:00"
  • 2018-02-01 00:00:00
  • 2018-02-01
  • "2018-02-01"
I'm trying to pre-filter for records Less than or equal to a date. I've searched online, and looked at my notes, but can't work this out.

Many thanks for any help :)
There has been indeed changes regarding dates in pre-filtering, but NOW() should work. just make sure you use "no quotes" as type when using NOW().
 
your-date-element
LESS THAN OR EQUALS
2018-02-01 00:00:00
Type=Text
Apply to = Public (or whatever you need)

should do.

For debugging set "Allow Fabrik Debug"=YES in Fabrik Options/Debugging
Then append &fabrikdebug=1 (resp. ?fabrikdebug=1 if there's no other URL parameter) to you list URL.
Depending on your list setup you'll find the genereted query by clicking on
"table:mergeJoinedData get ids" or "list GetData:your-list-name"
 
Thank you so much Troester! This has been driving me batty for the last hour :)
I will update my notes accordingly!
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top