Protiviti / SharePoint Blog

SharePoint Blog

September 14
Updating Multiple Document Libraries with 2 Simple Nintex Site Workflows

I recently had an issue where I needed to alert owners of multiple Document Libraries that reviews were needed based on defined review dates.  Each item in the library is configured with a specific review date based on its last reviewed date and a review interval - the amount of time from the last review to the next one - measured in days.  I created two Nintex site workflows to accomplish this task.  The main workflow runs each day and uses special library fields/properties to fetch a list of matching documents that are up for review in the coming week.

As mentioned above, each of the Document Libraries has the following properties:

Last Review Date

ReviewIntervalInDays (amount of time, in days, between document reviews)

NextReviewDate (calculated field based on the [Last Review Date] + [ReviewIntervalInDays]

For this task, we want to be able to loop through each of the Document Libraries, but the Query List action’s Query builder configuration option shows a drop-down allowing the User to select only one Document Library.

Shawn1.2.PNG

When this Query List action is placed inside a For Each action, we can easily search multiple Document Libraries for review dates that are coming due and send out requests to the responsible parties.

For this example, I created a Collection Variable and loaded it with the names of the Document Libraries that I wanted to be included in the review.  I then ran a For Each action, mentioned above, on the collection and was quickly able to see the list of documents that required review.

Here is a screenshot of the main part of the workflow:

Shawn3.PNG

As can be seen in the figure above, there is an outer For Each action that is responsible for looping through the collection of Document Libraries.  The inner For Each is responsible for looping through any matching documents from the query and executing the secondary workflow for each document.

If you want to simply send out a notification to each responsible person, one workflow will suffice and the Start Workflow action can be replaced with a Send notification action.  However, if you want to create a task for each responsible party that will be tracked, a separate workflow should be created that is called for each document.  This workflow will accept, as parameters, the item id and the Document Library at a minimum.  

The second workflow is responsible for creating all of the individual tasks and allows the first workflow to complete without having to wait for every task that is created.  The contents of the second workflow can be as simple as querying a list based on the input parameters and sending a task to the responsible party (as shown below in Figure 4):

Shawn4.PNG
With this configuration, there will be many instances of the second workflow created, but the initial workflow is allowed to end.  The instances of the second workflow will end as the responsible parties respond to the assigned tasks.

That’s all there is to it!  Now you can create these workflows for yourself and make sure that all of your documents have the most current information.




Quick Launch


© Protiviti 2019. All rights reserved.   |   Privacy Policy