Searching for or excluding items with empty fields
When using Instant Search, it is easy enough to find something when it contains that specific word or category. I can also do a search for items that should not include that word or category by using NOT in my query. However, I cannot seem to find a way to locate all the items that do not have any value assigned at all to that field.
For instance; find all items that do not have any category assigned or find all contacts for which I haven't specified their birthday or company.
How can I use the search feature to return all items that have empty fields?
To search for items that don’t have a value set for a particular field, you must use the the open and close bracket characters ( [
and ]
) as the value.
This method can also be used for the reverse; To find all items which do have a value set for a particular field and you don’t care what that value is.
This allows you for instance to find all contacts for which you don’t have a birthday set or to find find all contacts for which you do have a birthday set.
Searching with brackets
To search on empty values you simply use the query field you’d normally use but then use the open and close bracket characters as the value.
To do the reverse and find all items that do have a value, prepend the empty value query with NOT
.
Examples;
- To find all messages without a subject you use;
subject:[]
- To find all messages without a category assigned use;
category:[]
- To find all messages who have a category assigned (doesn’t matter which) use;
NOT category:[]
- To find all messages who have a category assigned except for the category named “Blue category” use;
NOT category:[] NOT category:“Blue category”
- To find all contacts without a Birthday specified use;
birthday:[]
- To find all contacts with a Birthday specified use;
NOT birthday:[]
- To find all contacts without a Birthday specified who belong to the category “Family” use;
birthday:[] category:Family
Once you know the search syntax, finding items without a specific field or property set becomes quite easy.
Outlook 2007 and previous
As this feature has been added to Instant Search in Outlook 2010, there is no way to do this with the Instant Search feature in Outlook 2007. For all previous versions of Outlook, you’ll have to use Advanced Find or the below described “View sorting method” instead.
Once you’ve opened Advanced Find (CTRL+SHIFT+F), switch to the Advanced tab. You can now add/type the field name that you want to search on and set the condition to “is empty” or “is not empty”. For some fields you’ll have to use “does exist” or “does not exist”.
This method will not work if you want to combine your search with an exclude on the same type of field.
For example;
Find all messages who have a category assigned except for the category named “Blue category”.
If you want to do the above search, then you’ll have to enable the Query Builder, which is hidden by default. Once you’ve done that, you can create the search;
Categories is not empty
AND
Categories doesn’t contain Blue category
View sorting
Another way to find all items with a specific empty field is to simply sort your view by the field that you want to search on.
For instance, to easily find all contacts for which you haven’t set a birthday, switch your view of the Contacts folder a list view such as Phone List, add the Birthday column and click on the column to sort it by date. All the contacts with an empty birthday will now be listed together.