Showing calendar groups using a query string



Question

How do you provide a link to a user where only one set of calendars would be shown in the calendar plus web part?

Answer

In order to be able to show calendars using a query string URL, you need to group your calendars into meeting categories when setting them up in the calendar plus web part first. When setting up either a shared Exchange calendar or a SharePoint calendar, there will be a field called “Meeting category name”. This allows you to add your calendars to a group.

After doing that, you can use the following query string to show only certain meeting categories:

?ms-cal-selectedlegendsWPQ2=;cat1;

Cat1 would be replaced by the name of the categories you want to show separated by a semicolon.

WPQ2 is the web part qualifier  To find this value, you can use your browser dev tools to inspect the title element of the calendar web part. This value would likely be WPQ1, WPQ2, WPQ3 etc.

In this case to show the above pictured calendar, the URL with the query string would be:

https://kwiz-dean.cloudapp.net:2013/calendar/SitePages/Home.aspx?ms-cal-selectedlegendsWPQ2=;easy;