views:

163

answers:

5

In 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?

+9  A: 

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
JacobM
Brilliant and simple. It will limit "power-users", as they can't construct complex expressions, but for 99% of the users this will suffice. Thanks :-)
Svein Bringsli
You should add a `{use advanced query}` button at the bottom.
David X
To account for 99% of the cases, I bet you can simplify it even more and have a single list of values and a dropdown for an operator (All, Any, None). I think you’ll find that very rarely do users need more than one operator for the same field/attribute (e.g., All of these values OR Any of those values). You lose a little flexibility but it prevents logic errors like the same value selected in both Any and Not.
Michael Zuschlag
"some of these"? Not sure how that actually looks in code, but `joe average` will want it if you phrase it that way."retail but not chain"?Don't get me wrong, I *do* like this (and voted it up), but .... not sure there is anything wrong with your solution, but maybe with OP's supposition...
Mawg
A: 

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.

Aito
+1  A: 

Maybe you could use Google's advanced search way of specifying the search. With any luck you users will be familiar with this.

S.C. Madsen
+4  A: 

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.
Ender
Point 1) I agree :-) Point 2) It's an intuitive and easy way to do it, but it requires going through the list after each iteration. Too time-consuming in this case. Point 3) You are absolutely correct. My users don't need to make complex expressions. I will probably go with JacobM's solution. It's flexible enough, at least for my current needs.
Svein Bringsli
+1  A: 

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:

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.

Michael Zuschlag