Like most consulting groups that build a lot of workflows for process automation, we work with a lot of approval processes to help formalize important reviews and decisions while supporting compliance activities. We recently received an interesting request to update an existing process we helped build and maintain. In this particular approval process, the financial transactions were being reviewed and approved, but the stakeholders really needed to be able to view the pending and approved transactions.
Adding a calendar to visualize when approvals have taken place was a big win with the client. The requirements for setting it up were simple. The events would have either a 'Pending' or 'Approved' state and can approve via email. Finally, the events would appear on a calendar color-coded to each state of approval. Because the pending documents are stored in a separate library from final documents, and to support color coding and full featured calendar connections, we chose to use a calendar list versus the limited calendar view format for a traditional SharePoint library.
Nintex's LazyApproval is a great solution for approval workflows. Setting up the workflow was simple. Once a user adds a new document and sets the event date, the workflow creates a calendar event and then creates a task. The first step in the workflow is a filter to check if the Created date is equal to the Modified date. This lets me know if the item was just added to the library without having any metadata added to it. I could check to see if a calendar item has already been created. This would occur if an item had already been rejected and updates have been applied to the original item. If not, the calendar item is created in the 'Pending' state. On approval, the calendar item is set to 'Approved'. If rejected, it will stay as 'Pending'.
The workflow looks like this:
The way I keep the Calendar Events in sync with the documents is by using the Document ID. I added a text field called "Document ID" and write the Document ID value on creation of the calendar item. That makes it easy to query.
Setting up the calendar requires a trick in the use of the ribbon option 'Calendar Overlay'.
Normally, separate SharePoint calendars are used to overlay onto a single calendar. Using that method, 3 separate calendars would be required for this solution, one for each state of the event. The trick is to add a separate calendar view as a separate calendar. By using this method, there is no need for separate calendars, only for separate calendar views.
Once you enter your site into the Web URL and click 'Resolve', the List and List View dropdowns should populate. Simply choose them and when your calendar items meet the criteria for the list view, they will appear with the color you chose.
The result is a single calendar with multiple color-coded entries. Events can even span multiple days or specific times depending on your start/end dates and times.
While this is just a subset of the total workflow, it illustrates a great technique that can be used for supporting your compliance activities. Creative uses of workflows with SharePoint apps help demonstrate the full power of the platform as well as their investment to the client generating a win on many levels. Utilizing what is available in the box combined with thinking out of the box is key to happy clients.
If you would like to learn more about this solution, or how we can help automate different aspects of your business, please contact us.