How to let an average user design a boolean expression graphically [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this questionIn our application there's a list of customers, and a list of keywords (among other things). Each customer can have a number of keywords, but it's not mandatory. So for instance, one customer can have the keywords "retail" and "chain", one can have only "contractor" and a third can have none at all.
I want to let the user make a selection of customers based on these keywords, but not having to write (retail AND chain) or contractor and not wholesale
I would like to make it as user-friendly as possible, and ideally with only "simple" controls, like checkboxes, comboboxes etc.
Does anyone have any suggestions on how to design this? Or maybe some examples of applications where there is a similar functionality?
Maybe the simplest UI would be something like:
Find customers with
All of these Any of these None of these
[] retail [] retail [] retail
[] chain [] chain [] chain
[] contractor [] contractor [] contractor
[] wholesale [] wholesale [] wholesale
End-users have serious trouble with complex boolean constructions. There have been a number of studies of this (AND is pretty easy for them to understand, but OR is hard). Provide your end-users with access to a general-purpose boolean expression generator and you're jumping down a rabbit hole with no end.
- JacobM's solution is a nice simplification.
- One system that I've used in the past is to have search refinement: only allow maybe one or two decisions for the first search, then allow end-users to whittle down the results with a series of single decisions ("just show contractors", "not retail", etc.) For this to work well you usually need an easy way for them to maintain recent searches, either through a tabbed window list or something else.
- Think carefully about your end-users. Do they really need a complete boolean search generator? What is the actual data that they want? Does accessing that data require searches no more complex than some arbitrary limit? If so, design your UI to support just up to that limit. JacobM's solution is an example of this to some degree.
For more power and flexibility than you can achieve with a fixed lists of fields, there’s query-by-example, a well established approach that allows the construction of complicated Boolean expressions.
For truly graphically ways to specify unlimited arbitrary Boolean expressions, there’re a couple that use pathway metaphors:
Murray, Paton, and Bryce’s Kaleidoquery (Journal of Visual Languages & Computing Volume 11, Issue 2, April 2000, p151-189)
Shneiderman’s Filer/flow (Proceeding of the 54th Annual Meeting of The American Society for Information Sciences, vol. 28, Washington, DC, Oct. 27-31, 1991, p379-384).
While better than SQL-style Boolean expressions, all of these are relatively complex UIs, likely requiring at least some practice to use well. Thus, any such ad hoc querying ability should probably be insulated as an “advanced” feature. In most applications, users have a few very specific kinds of queries that account for the vast majority of their work (e.g., accounts with in arrears for more than n days). A simple dialog to select canned or semi-canned queries is best for this and should be the default UI.
Maybe you could use Google's advanced search way of specifying the search. With any luck you users will be familiar with this.
MS Access database has a wizard to make reports. The user is guided to construct a SQL query in an intuitive way. TOAD has a wizard to filter queries too.
I hope it helps you.
精彩评论