MySQL functions like now() in server side filters


How can I create a server side filter for the following SQL expression in a role?:
(startdate=0) or (startdate <= now())

Trying using a MySQL function as filter value always results in an error “Field ‘starttime’ must be a valid integer.”.
Also I don’t know how to use nested filter conditions.

Related to DreamFactory 2.1.2 (self hosted linux)


I solved it now: You have to add parenthesis around the MySQL functions AND you have to separate the parenthesis with spaces!

A working example for a nested filter:

Field: "( starttime"
Operator: "<="
Value: “( UNIX_TIMESTAMP() ) ) OR ( starttime = 0 )”


Hello @bohndorf, we’re so glad to see that you solved it! Thanks also for posting the answer.

If you want to share your DreamFactory story, we’d love to hear it.