Content By Query – Search for nulls

Content by query is such a handy tool.  I can find ANYTHING!  Documents added only that last month?  Easy.  Comments that have been approved?  Easy.  Posts that haven’t yet been tagged?  Um . . .

I couldn’t seem to find an “official” way to solve this problem, but I discovered a hack for it.  If you need to search for a field that is null or blank, search for a condition in that field that can’t possibly be true.  For example, the value is both greater than and less than 0.  Suddenly, you’ll be presented with a result full of blank values in that field 🙂

Works great if you need to create a web part listing things that are missing information.

Note that this is for Sharepoint 2010, I haven’t tried it in 2007.

Advertisements

~ by Liz on February 22, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: