3

enter image description herei'm struggling with an issue ... What is the best way to allow a user to search on an explicit empty value.

By default , when you leave an input field empty you get all the results , but now we want to explicit perform a search on only the empty matches.

My idea was to put a checkbox in front of the field but on the other hand i find it not so user friendly

I'm curious to hear your solution ...

  • How would you define what you are searching on? For example, if I search for 'Dieter' I know that I can search on first name or all fields, but generally first name would be a fairly sizeable return, if you're search on empty fields, which columns in your database are you wanting to search? – DarrylGodden Aug 01 '17 at 07:30
  • Not an answer to your question: That's an awful busy search form. Might I suggest that you provide as few search fields as possible and change things like date, type, etc., to filters on the results list? – Ken Mohnkern Aug 02 '17 at 12:46

3 Answers3

1

I'm struggling with the use case for this, but anyway, would this suggestion work? I'm still unclear on how you specify which field is your empty value, unless you are saying it would return all fields with empty values?

Empty Fields

DarrylGodden
  • 6,316
  • 14
  • 35
  • In fact we have a search form with seperate input fields. So specifying the field is no problem.

    Use case could be : when no value specified in the field "reference" give me all articles. When explicit searching on empty values than only return articles without a reference. Assuming that the reference field is not obligatory

    – Dieter Coopman Aug 01 '17 at 08:05
  • If there are no problems, why are you asking? – DarrylGodden Aug 01 '17 at 08:07
  • 1
    I was wondering if there were other suggestions than mine + my question is on how to visualize it good ... sorry if this was unclear – Dieter Coopman Aug 01 '17 at 08:10
  • Best if you post a screenshot of what you are using now, so we can get an idea of where improvements could be made. – DarrylGodden Aug 01 '17 at 08:13
  • Ok , will do that in the future ( will add a picture to my original question now ) , your second part of the screenshot looks me a better solution than the checkbox per field, because we would have many checkboxes.

    One checkbox on the end of the form "show me all empty values" is maybe a better solution

    – Dieter Coopman Aug 01 '17 at 08:16
1

For better or worse, users have come to interpret a blank text box in a search/query criterion to mean “exclude this field” or, equivalently, “accept any field value,” so that makes searching for blank values difficult to communicate. Complicating the issue is that searching for blanks is usually a pretty rare task, so you don’t want to dedicate a lot of visual design to something that is usually just a distraction. Where is the tradeoff between clear and cluttering?

As you seem to suggest, you could use a check box by each text box to indicate whether to include the associated field or not, which means a blank text box (with the checkbox checked) means to search for blank values in the field. There’s other advantages to that approach, but it can also add clutter and work for the user (for those who think they have to check the box before entering the criterion value in the text box). Furthermore, users are so used to blanking to mean “exclude the field,” that it may not work. For example, some users may clear the text box to exclude the field rather than unchecking it, and not realized they’ve set the criterion to a blank value (“Why aren’t I getting any results?”).

Here’s some ideas that may work better, ordered from most explicit and self-documenting to least cluttering and distracting.

  • Toggle button by each field. Each text box includes a button beside it that sets the criterion to a blank value. Labeling the button as Search for Empty or Search for Unfilled or Search for Null (depending on what you users find most clear) makes its function most explicit, but also makes for a long large button that is only worth it if many users search for blank but don’t get any training. Otherwise you could try a briefer label like Unfilled or “ ” or maybe { } (if your users are mathematically inclined). A tooltip can tell the user what a more cryptic label mean.

  • Option on combo box. Use a drop-down combo box instead of a text box, and include {Unfilled} (or whatever) as an option. Other options on the drop down list can be something handy like the most recent prior criteria. It can also have common combinations of criteria (e.g., Cautions OR Warnings) and other nonliteral criteria, if there are any (e.g., {Invalid}).

  • Toolbar. Rather than a button for each text field, have a single button at the top of the page that sets to {Unfilled} whatever text box currently has focus. Additional buttons can be included for other nonliterals (e.g., {Invalid} or {NaN} for numeric fields, OR to enter multiple criteria strings joined by logical OR, wildcards and regular expression symbols, such as "any digit"). If your search criteria page has a lot of fields, like your screenshot, this can substantially reduce clutter, while still visually cuing the user that it’s possible to search for blank values. It’s just a little harder to figure out how.

  • Micro-grammars. Let the user type into the text box a special string or escape sequence that means “search for blank.” The user could, for example, type in {Unfilled}, or "" or {} or _ . For bonus points, allow other advanced notation, such as wildcards (* or %), regular expressions, and Boolean operators (e.g., | to allow users to enter several strings joined by a logical OR). Obviously, this is only good if you have user training and/or excellent (and well-used) on-line help. A community of self-supporting users helps too. However, this may be your best solution if search for blank is an extremely rare use case.

Whatever you do, expect to do some usability testing to find what works with your users and refine it.

Michael Zuschlag
  • 37,870
  • 4
  • 57
  • 105
1

Add '0' or 'none' as options in drop-downs. Allow users to enter values like 0 or none in text fields. Add a fuzzy search drop-down in front of the text fields with options like 'contains', 'equals', 'does not equal', etc.

For example, for 'Kleuren' a user might select 'does not equal' and then type in 'red'. The search will return all colors except red. For 'interne opmerkingen accent', if the user doesn't need/want that, they might select 'equals' and type in 0. Validate any assumptions with user testing.

Joel Garfield
  • 704
  • 3
  • 15