AND/OR operator for filters

The "to-do" list for Virtual Radar Server is as long as my arm, but if you want to pile more work onto it then this is for you.
Post Reply
Posts: 1
Joined: Sun Jan 31, 2016 8:26 pm

AND/OR operator for filters

Post by fostervs » Tue Sep 25, 2018 4:22 pm

Currently the filter operates as an AND function. Being able to select AND or OR would be helpful.
Example: I like to watch the air traffic around Las Vegas, but only the JANETS and MILITARY aircraft.
The JANETS recently changed from MILITARY to CIVIL. So I have to select filter OPERATOR CONTAINS JANET, or MILITARY.
Not both, because enabling both filters creates an AND function, so I see neither.

Posts: 2157
Joined: Fri Feb 17, 2012 3:20 am

Re: AND/OR operator for filters

Post by agw » Sun Oct 07, 2018 10:25 pm

I agree, it's been an annoyance ever since filters were introduced. The problem is that adding an OR introduces order of precedence issues and inevitably people start asking for parenthesis support to resolve them. It gets difficult to present that to the user without it turning into a mess.

One alternative that people have occasionally suggested is to let users type in straight SQL for the filters. I won't be doing that, too dodgy.

My preference is to keep the filters as-is but add support for an alternative filter where you can type in conditions in a SQL-like fashion, but the program then parses that and builds a SQL query from it with parameters for all of the literals in the filter. Nothing you type in forms any part of the SQL query. It is going to take some time to write and as the current filter system works OK for simple filtering it's not top of the list of things to do.

Posts: 11
Joined: Sat Oct 15, 2016 10:14 pm

Re: AND/OR operator for filters

Post by batrakiu » Thu Nov 22, 2018 12:15 pm

I thinks that is a good option.
Just adding the SQL string option on the drop down menu can do it. (I don't know anything about SQL, but if can use I'll learn. lol)

At this time, if I want to see an Air Tank (identified as Civil) and the Mil plane beside him, I can't see just the both on the feed.
Or for example just the planes from the Operators AAA and BBB.
If I can, please correct me. :lol:


Post Reply