Filter Expression compound statement

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

Filter Expression compound statement

#1

Postby Segi » Thu Nov 03, 2016 3:55 pm

Is it possible to create complex filter expressions that use compound conditions. I want to do something like this:

(Auths-ApprovalNeeded=1 AND Auths-ManagerApproval='') OR (Auths-ApprovalNeeded=0 AND Auths-FinalApproval='')

Clearly, you can't separate the conditions with parenthesis.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Nov 03, 2016 6:28 pm

The documentation says that the expression:

- is valid syntax for FPL
- must evaluate to true or false
- can contain field or column names

It's a long time since I used FPL but I thought you could use brackets, you can certainly use AND and OR. You can certainly make the expression as complex as you like so long as it obeys the above rules.
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Thu Nov 03, 2016 6:38 pm

Jon,

I don't normally use FPL as JavaScript is much more powerful. I tried using brackets but if you validate the FPL syntax when using brackets instead of parenthesis, the validator gives an error.

Now you've got me thinking that if Ebase could support Javascript filter expressions instead of FPL that would make it much more powerful
0 x


Who is online

Users browsing this forum: No registered users and 78 guests