The SharePoint calendar is an ideal place to give people a quick overview of team events, but the overview can be a bit thin on detail for some people’s tastes. The calendar structure is pretty rigid, so we can’t just add columns to the view like we do in other SharePoint lists. We can, however, pick which column to display in the calendar view. Using calculated fields we will build a new event title to have our calendar events communicate extra information at a glance.
Here’s what we want: when looking at the calendar we’d like our site members to see the title of the calendar event AND the location of the event in parenthesis. The pictures below show what SharePoint gives us out of the box compared to what we’d like for our site members:
SharePoint gives us: We Want:
Here’s what we’ll do in brief:
- Create two calculated fields, one to be the month view title and one to be the sub heading for day and week views.
- Modify the view to show our new columns instead of the default columns.
Create new calculated field columns
In our SharePoint calendar we’ll navigate over to the Calendar tab and click the "Create Column" ribbon button. We’ll call this column "Month View Title" and set the type to "Calculated". Now, let’s build up the formula. Remember, we want the end result to look like this:
Event Title (Location)
To create that string, our formula will look like this:
[Title] & " (" & [Location] & ")"
SharePoint’s calculated field will (among other things) combine, or "concatenate", strings. To concatenate strings we use the "&" (ampersand) symbol much the same way we use the "+" (plus) symbol for adding numbers. Building a string is as easy as double-click a column, type an ampersand, type some text in double quotes ("). We use the double quotes to make sure SharePoint knows we’re concatenating a string and not just another field.
For consistency with the month view, we also would like the location wrapped in parentheses for the day and week views. Let’s create another calculated column for this. Repeat the steps to create a column and call it “Day Week View Sub Heading”. The formula will look like this:
"(" & [Location] & ")"
Modify the calendar view
Now that we have the strings we want, we can change the calendar view to show our new calculated columns instead of the default, "out of the box" (OOB) event title.
In your calendar, head back over to the Calendar tab again and this time click the "Modify View" button. In the Edit Calendar View settings we’ll change the "Calendar Columns" to show our new calculated fields. The title fields we’ll change are the "Month View Title", the "Week View Sub Heading" and the "Day View Sub Heading". Since we’re extra clever, we gave our calculated columns names which match up very nicely with these field titles. Click the OK button to save changes and we’re done.
The SharePoint calculated column feature gives a lot of flexibility and can be used without having to open SharePoint Designer or learn to write custom SharePoint solutions. Check out this article on MSDN to get your creative juices flowing.