RSS Feed Is this your first time here? Get regular updates

Advanced SharePoint View and Filter techniques

Date:October 26th, 2008 Author:Ryan Tags: , , ,
Category: Filter, SharePoint Ideas Comments:54 ;

Introduction

We discussed in a previous article how to customise SharePoint’s built in Task List and briefly looked at the power of Views with Filters. In this article we will build upon that by demonstrating some advanced use of Filters.

This article assumes that you are already familiar with Views and Filters – if not please review the previous article.

Overdue Tasks

To show a task lists Overdue tasks use the following Filter :-






  • Status – is not equal to – Completed

And

  • Due Date – is less than – [Today]

Note – [Today] is a special marker that SharePoint understands as the current date.

Overdue Tasks

My Overdue Tasks

Add the following to the Overdue Tasks filter






  • Assigned To – is equal to – [Me]

Note – [Me] is a special marker that SharePoint understands as the current user.

Items added in Last 7 Days

It would be nice to be able to enter something like

  • Created – is less than – [Today] – 7

in the filter, but alas its not quite that simple!

[EDIT - This work around was written in early 2006 and WSS 2 / SPS 2003 wouldn't accept this - in WSS 3 / MOSS 2007 you can now use a FILTER formula like [Today]-7 as long as you keep the spaces out!]

The workaround is to create a Calculated column and then filter on that column.

Select Modify Settings and Columns, then Add a new columnGive the column name something like “Filter 7 Days” and select a Calculated column

Name the view "Filter 7 Days"

Enter a suitable DescriptionIn the Formula box enter “=Created+7″Choose Date and Time format and Date Only






Clear Add to default view as we don’t want this field to appear on any of the views

Set the calculated columns formula
Create a new viewSetup a filter to show only :-






  • Filter 7 Days – is greater than or equal to – [Today]
Set the views filter

Items Due in the next 7 Days

[EDIT - This work around was written in early 2006 and WSS 2 / SPS 2003 wouldn't accept this - in WSS 3 / MOSS 2007 you can now use a FILTER formula like [Due Date]-7 as long as you keep the spaces out!]

Select Modify Settings and Columns, then Add a new columnGive the column name something like “Filter Coming Due” and select a Calculated column Set the new columns name and choose "calculated column"
Enter a suitable DescriptionIn the Formula box enter “=Due Date-7″Choose Date and Time format and Date Only






Clear Add to default view as we don’t want this field to appear on any of the views

Set the calculated columns formula
Create a new viewSetup a filter to show only :-






  • Status – is not equal to – Completed

And

  • Filter Coming Due – is less than or equal to – [Today]

And

  • Due Date – is greater than or equal to – [Today]

This will ensure that the view only displays Uncompleted items that are due in the next 7 Days but are not Overdue.

Set the filter

Items due in the current Calendar Month

If you need to filter for a Calendar Week/Month (rather than a rolling 7/30 day period) then this post details how

How To Use Filters in SharePoint to show items in the current Calendar Month

Related posts:

  1. How To setup a SharePoint view filter to compare 2 list fields SharePoint workaround to create a list view based on a...
  2. How To Use Filters in SharePoint to show items in the current Calendar Month Its very easy using the Filter feature of SharePoint...
  3. The … ehem… Truth about using [Today] in SharePoint Filters This post looks at the different requirement for using [Today]...
  4. The Truth about using [Today] in SharePoint Calculated Columns This post offers workaround for using values like [Today] and...
  5. Extend and customise SharePoint Task lists One great feature of SharePoint is the ability to extend...

Tags: , , ,

Did you enjoy this post? Get the next one by RSS or by email

Share:

54 Responses to “Advanced SharePoint View and Filter techniques”

  1. Philipp says:

    Hello!

    Is it possible to make a filter that only display the items that createt in the current year?
    For Example: i have items created 2009 and 2010 in my list.
    Now i only want to display the items that created in 2010.
    In 2011 in want to display only the items from 2011 and hide the 2010,2009 items and so on…

    Cheers!
    Philipp

  2. Ryan says:

    This post shows you how to do the current calendar month and at the bottom there are examples for current year.

    http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/

    You can adapt this for the previous year (use YEAR([Date])-1)

  3. Philipp says:

    Thank you, works perfect!!!

Leave a Reply