SharePoint 2010 Calendar overlayCalendar Overlays was definitely a welcome new feature when SharePoint 2010 was released.  They provide decent basic functionality for being to have a nice view of multiple calendars at once (up to 10 calendars).  Suppose you are in a situation where you want to do some calendar overlays, but you only want to show a filtered set of calendar entries on the calendar overlay view?  This turns out to be much easier than it might sound.  Now you could write a simple workflow that runs on the child list and copies the list item on the child calendar to the parent calendar, but that’s not really an overlay is it?

As I said, this is actually extremely easy to configure.  It feels like it should be illegal to be this easy, so enjoy the moment!  So what do we need to do?  Here are the overview steps:

  • Create at least 2 calendars (one child, and one parent used to display the overlay)
  • Create items on the child calendar
  • Create a filtered Calendar View on the child calendar (e.g. only show items where category=X)
  • On the parent calendar, configure the overlay, and be sure to choose the new filtered view
  • Sit back, have a drink and bask in the awe of your coworkers and boss as they bow before you in the view of this incredible display of SharePoint awesomeness

So let’s get this done. 

First let’s make sure our child calendar is setup right.  We need a mechanism to filter the view on.  In our example, this is the IT department’s calendar, and they post server outage times on their calendar among department meetings and employee vacation.   Go to the list settings, and add a new column called Category, adding a value called IT Outage.  Now add a calendar entry and choose the IT Outage category.

SharePoint 2010 calendar

Now instead of trying to filter it on the Corporate Calendar, we just need to create a filtered view on IT Calendar and point the overlay to it. 

  • Create a new “Calendar” view named “IT Outages”. 
  • Configure the view to be filtered to the Category column equals “IT Outage”:

Calendar filter option

You should only see entry on the this view of the calendar, your outage item.  Now we need to configure the overlay. 

  • Go to the Corporate Calendar in our case, and click Calendars Overlay in the Calendar tab in the ribbon. 
  • Click New Calendar.
  • Name the Calendar name IT Outages, leaving the type SharePoint.
  • Type in the URL to the IT subsite, and click Resolve.
  • Choose the IT Calendar list in the dropdown, and the IT Outages view in the List View dropdown.

Configuring the Calendar overlay

This is what our Corporate Calendar looked like before we added the overlay:

SharePoint 2010 calendar

After we’ve added the filtered view in the overlay, now we see the calendar entry from the IT Outage!

filtered SharePoint 2010 calendar overlay

Like I said, piece of cake.  There is one other consideration here, which is security.  If the user viewing the Corporate Calendar does NOT have permission to the IT Calendar, they will get error saying “Unexpected response from server.  Nice right?  If you’re savvy with CSS, you can embed a style tag to hide it.  The class is .ms-acal-error.

<style type="text/css">.ms-acal-error{    display:none !important;}</style>
Credit for the above CSS came from this blog.  You can always find this out by clicking F12, and using the IE developer tools or Firefox firebug to determine the class as well.  Happy filtering!