I've built a simple web-based query builder using a series of dropdown lists such that the only typed input is the final value field.
In the example above simply adding the filters consecutively would not produce the desired result set, each of the "OR" clauses should be grouped together.
I'm struggling to come up with a way of providing the user with a simple interface to define/display/edit groups. I don't think it's possible to infer filter groups (using the current interface) based solely on the order of AND/OR filters. Is it?
Answer
You can have a look at the Gestalt principles of grouping to get ideas. Following these principles could mean using, among others:
Identation as mentioned by @ethrbunny to give a sense of nested queries,
Using the
to group conditions (i.e. remove from each and every row, and include only where a group starts and ends),- A special row which would include just an
AND
or anOR
could indicate where a group starts. That would suppose you give the user to "add condition" or "add group". - Allow saving queries, so that a query can be set as a condition in another query, thus allowing the user to effectively use a pipeline of subqueries.
Other similar ideas might exist. Hope that helps! :)
No comments:
Post a Comment