10 10 2007
Creating simple tasks calendar for SharePoint sidebar
I needed view of SharePoint calendar where I can see not accomplished activities from beginning of calendar until tomorrow. If you ask me why I needed something like this, there is a simple answer: this calendar contains almost everything that is going on (mainly different milestones and deadlines).
As it is common calendar and everybody wants to see everything then there is no need for personalized filter. And there was one more requirement – there must be support for states of tasks describing if event is planned, done or canceled, so we can show in sidebar calendar only the planned tasks or events.
Here is my solution to this problem.
- Create new calendar if you don’t have one.
- Add new column called Begin Date.
- Follow the instructions given in my previous post Filtering SharePoint calendar by Start Time.
- Add new column called Status.
- Status must be required field and let’s say it may have values Planned, Done and Canceled. Planned is default value.
Now the calendar list is okay and we can go further and create a web part that is showing tasks the way we want.
- Go to page you want to put your tasks calendar and open it in edit mode.
- Add your calendar to right side of page and open it in modifying mode.
- Go to views list and click on Edit the current view.
- Web part view is opened and now you can customize the view.
All we need to do is to add some filter conditions and – of course – sort order of the list. Let’s start with sort order. To see problematic tasks (the tasks from previous days) on top of list and newer ones after these, we have to sort the list by Begin Date to ascending order. As our list may be pretty long we want to show there only tasks that are started in the past or that take place today or tomorrow, we need one filter based on Begin Date. To make sure we have only planned tasks visible in our list, we need one filter more – for Status.
- Sort your list by Begin Date to ascending order.
- Add filter condition where Status is equal to Planned.
- Add filter condition where Begin Date is less that [Today]+2.
Save the list, web part and page and go to the page where your web part is. Now it should show only planned tasks for past, today and tomorrow.