You may also be interested in: SharePoint-based solutions by B&R Business Solutions
Editor’s note: Contributor Adam Quinn is a Senior Information Architect at the American College of Physician Executives. Follow him @lucidpiper
I recently was tasked with creating a new SharePoint Calendar to capture a variety of different events for my organization. They wanted to visually see differences in a calendar view, so I opted to use the Calendar Overlay option (using SharePoint 2010), and create multiple content types for each of the different types of events since many events had to capture unique information.
As I journeyed down what seemed a fairly straightforward path, I encountered a variety of roadblocks to which I had difficulty finding the answers including having duplicate titles for each event in calendar view. This prompted me to write this post on how to successfully set up a single Calendar that uses different content types and have them display using the calendar overlay function. This is mostly an OOB approach which optionally requires use of SharePoint Designer 2010.
First and foremost, I documented what my content types were going to be. I established what base metadata was required across all events, and made a “Base Event” type based on the OOB Event content type. I also added a couple of custom site columns to use in these content types.
As a side note, I initially went down the path of using an “Item” as my base content type instead of an “Event”, mainly because the Event CT includes the “Workspace” option; I was unable to find a way to hide that field from users (something we did not want to use) – however after further investigation I discovered how to easily hide this field using SharePoint Designer (see Appendix below). If you do want to use this field, use of SPD is not required.
Once I had my base event type defined, I used an Excel spreadsheet to document the fields and map out additional Content Types using my “Base Event” CT as the parent:
Working with my stakeholders, I used this core content type to start the conversation and then defined what additional fields were required for the other CTs. At the end of this exercise, I documented 7 custom content types to use in this calendar using the format above. This provided a great reference when I was actually creating the new content types and greatly helped to confirm with my stakeholders that we’re capturing the correct information.
I then used my worksheet as a map to create the Content Types:
Site Actions->Site Settings->Site Content Types->Create
Give each CT a unique name and description. For my Base Event I used the Event as the Parent Content Type. For all other custom content types, I used my Base Event as the Parent Content Type:
Once all the content types are configured, create your new Events Calendar:
Site Actions->More Options->Create Calendar
Go into the List Settings to add the new content types and configure views:
Calendar Tools->Calendar->List Settings
Under Content Types, select Add from existing site content types. From here you can add multiple content types to include in your calendar:
By default, the calendar uses the Event content type, which I did not need as I had created my own custom Event CT. To remove this after adding your new CTs, you can delete the OOB default from this calendar by clicking on the Event CT in List Settings, and selecting Delete this content type. You can also use the Change new button order and default content type to establish your new default and configure the order your content types will display to your users.
Create Custom Calendar Views
Now that your content types have been added, you’ll need to create a custom calendar view for each content type that you want to have displayed in the calendar overlay.
Scroll to the bottom of the List Settings page and select Create View->Calendar View
Provide a unique name that maps the view to one of your content types (i.e. Webinar Calendar). The Audience should be set to Public View. You will also want to make sure each calendar view for each content type mirrors each other using the same settings (example below):
You then need to provide the filter criteria to only show this content type (example):
Once finished, click OK to save the view. Go through this same process to create a new Calendar view for each of your content types.
After all of your views have been configured, you can now apply these views to display as a calendar overlay. Exit the List Settings and go into the base Calendar View (the view that was created by default when you created your calendar). In the left column, click on Calendars in View:
Select New Calendar to add as an overlay (Note – you will want to enter the overlays in the order you want them to be displayed on the main calendar page – these cannot be re-ordered once created). Name this calendar the same as your view (i.e. Webinars). Select a color to represent this calendar in the main overlay. Then enter the URL of the site where your list lives (not the list itself), and click Resolve. This will populate the drop-down fields with available lists and views based on the site listed in the Web URL field. Select your appropriate List and View:
Repeat this process for each calendar view you want to have rolled up in the main calendar overlay, giving each Calendar a unique color. Once completed, you are ready to start entering data in the calendar – however, as you’ll notice with this configuration, this will likely create double-entries in the calendar overlay. This can be easily remedied by placing a filter on your primary Calendar view:
Go to your main Calendar View. You’ll notice now under “Calendars in this view” all the additional calendars that have been added. Note that clicking on these calendars will filter the calendar to just show that particular view for end users:
From the main view dropdown (or under Calendar Tools) select Modify this View. Make sure the criteria defined in this view matches what you’ve defined in the custom calendar views. Under Filter, you want to set the following criteria to weed out the duplicate entries:
Yes, leave that field blank. As this calendar uses only content types you’ve defined, this will remove the duplicate entry issue. Save the view, and now you should be good to go!
Appendix: How to hide the Workspace option from Event content types using SharePoint Designer:
So you’ve got your custom content types defined for various events, but you don’t want your users to be able to create a new workspace site for every event they create. In fact, you just don’t want that option at all! This is easy to remedy, but requires SharePoint Designer to do so.
From any view in your calendar, select List Toole->List in the top toolbar. In the Customize List section, select the Edit List function:
This will open up your list in SharePoint designer (may take several seconds). Once it loads, your content types will be listed in the bottom box of the left column:
Click on the name of one of the content types you want to remove the Workspace column from (i.e. Webinar). In the Customization box, select Edit content type columns. This will display a list of all the columns included in your content type and note what is required, optional and probably include several Hidden fields. Find Workspace under Column Name and select it to highlight the row (notice that Property value = Optional). Click on Optional once while the row is highlighted to trigger the dropdown selection, and select Hidden. Make any other changes you require, and then X out of the main window, which will prompt you to save your changes.
Use the Navigation (far left column) to drive back to your Calendar (under Lists and Libraries) and repeat for all other content types that you want to hide this field from. When finished, you’ll find when your users select a content type to add to your calendar, this option is no longer visible.
I hope you find this information helpful!