1,804 articles and 14,796 comments as of Friday, April 15th, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint (Joel Oleson) content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Friday, January 23, 2009

Filter by an Empty Field

I ran into a little quirk this morning that turned out to have an interesting solution. When authors submit articles to the Article Submission Library at EndUserSharePoint.com, there is a date column named “Actual Publication Date” to compare against the “Scheduled Publication Date”.

I want to create a view that shows only the articles that have not been published.

My first pass used the filter section to say “Show items when Actual Publication Date is greater than 1/1/2008″. I figured since it was a date column, any item that had a date in that field would not show up in the view. Nope… didn’t work.

Then I thought “What if you filter for an empty field?” So this time, I set filter to “Show items when Actual Publication date is equal to” and left the value field empty…. Score!!!

Weird one… don’t compare against the date, just leave the filter value empty. You learn something new everyday.

 

Please Join the Discussion

13 Responses to “Filter by an Empty Field”
  1. Erich O'Donnell says:

    I had this problem recently and tried this option, but because I was trying to filter on a rich tex, multiple lines field, it wouldn’t let me filter on a null value. To get around this I had to develop a page that displayed info called through the web service on the list.

    Does anyone know of a simpler way to do this?

    • Eric Mortenson says:

      I’m still trying to figure out how to filter blank multiple line fields (rich text or otherwise). Erich, can you explain your solution in a little more detail? Does anyone else know of an easier way?

  2. Rik says:

    Do you also have a solution when you want to do the same for a content by query webpart on a publishing page? i want to filter by an optional date & time field that holds an custom expiration date (”show on frontpage untill”)…

    Kind regards,
    Rik

  3. Sarah says:

    Thanks so much for this info! I just spent about 20 minutes trying to figure this out and used “contains” instead of “is equal to” and left it empty but that didn’t work. Your solution was perfect!

  4. Ben says:

    Thank for this.

  5. Marilyn Greenwell says:

    Trying to do just the opposite of this task with a multiple lines of text field. Any suggestions? I want to display only the items that have content in a certain field/column.

  6. Ken K says:

    When I used as second or third filter the empty filter did not work (no errors and it did not filter the field). The empty filter worked only after I placed as the first or only filter.

    Thanks

  7. denise says:

    Thanks! Saved me lots of time and spared me gray hair! ;)

  8. Tobin says:

    This worked nicely, however I found that when I was in another view and I deleted mistakenly entered data in a field in an effort to have the affected record reappear in the filtered view, the filter kept blocking that record from showing. Has anyone else come accross this same quirk and is there a fix for it?

  9. PhilW says:

    Thanks so much. Like the others, I spent a good 30 minutes trying less than equal / less then, and used your findings to produce the view I wanted. :)


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!