*This post was originally posted here
Providing solutions for customers is always a win when you can improve communication between employees. With Nintex workflows, one of the challenges many developers have with Lazy Approval on Office 365 is capturing the comments provided by Approvers in the email back to the original submitter. A task email is sent to an Approver and that Approver can only reply with the approval/rejection keywords. Any other comments in the email will be disregarded by the system. Also, there is no option to CC the original submitter in the initial task email which means the only way for an Approver to email comments back to the original submitter is by manually copying them in the approval/rejection email. This would not allow the comments to be captured along with the task. Frustration with this issue can be seen on the Nintex UserVoice site where it is one of the top voted requests. While comments cannot easily be captured if the Approver replies by email, they can be captured if the Approver customizes the Nintex task form. Simply put, the comments are captured in a workflow variable and added to the body of the email.
To accomplish this, start by creating your form and workflow. For this example, I am using the simple workflow below:
The first step is to create the text variable that will capture the comments from the custom Nintex task form. Click “Variables” from the workflow ribbon and then click “New” to create the text variable. I’m calling mine “TaskComments”.
After that has been completed, go into your “Assign a task” action and click on the “Edit Task Form” button in the ribbon.
You will be presented with the standard Nintex form that you can customize. Next, create a panel at the bottom of the form and assign a rule to hide the panel at all times. The rule should have these settings:
Add a “Calculated Value” field to the panel. This field will assign the comment to the “TaskComments” variable we created earlier. Add the Named Control called “Comment” to the Formula and set the Connected to field to the variable “TaskComments”. The settings should look like this:
Save everything. Your form should now look something like this:
Now all that is left is to add the variable to our email. Go into your “Send an Email” action on the “Rejected” branch and add the “TaskComments” variable to the body of the email. It should look something like this:
Do the same with the Approved email and you’re done. Publish the workflow and you’re good to go!
This post was written for B&R Solutions
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.