Skip to main content

I tried searching for site workflow examples on the forum and I didn't see a tremendous amount, so I thought I would write about a simple site workflow that appears to be requested often.  The workflow needs to remind the document owner when the document review date is three months away (giving them time to review and update the document).

To run through this blog post, ensure you have a document library in your site called "Procedure".  Ensure that this document library has the following columns:

  • Review Date (Date and Time:  Date Only) - mandatory
  • Document Owner (Person or Group) - mandatory

 

A site workflow does not get created in a list or library, but is accessible though Settings > Nintex Workflow 2013 > Create Site Workflow.  The workflow designer will open ready for you to start developing your site workflow.

The first thing we need to do is calculate the date in three months time (as we will be using this to compare to the review date).  We will need to save the calculated date into a variable.  Create a variable in your workflow of type Date and Time and name as appropriate.  In the example below I have named my variable vDate3MonthsAhead.

Add the "Calculate date" action to the design node on the workflow designer.  Double click to configure as follows:

CalculateDate.PNG

Now we have the date in three months time, we can query our procedures document library for all documents where the review date = our calculated date above.

The results returned from the query list action will need to be stored in a collection type variable, ensure you have one created.  In the example below I have named my collection variable vCollFilteredRecords.

QueryList.PNG

So I now have a collection of item IDs for the procedures that are due for review in three months time (note this collection could be empty).

For each policy returned, I want to email the document owner and inform them that the review date is approaching.  To do this I need to query the item to get some details about the document.

Drag a "For each" action to the canvas and double click to configure. The target collection is the output from the query list (so vCollFilteredRecords in my case) and the Store result in requires a variable to store the item in the collection's ID.  I have created another variable of type List Item ID called vListIDProcedureID:

ForEach.PNG

Inside the For each container I am going to query the list of the current item in the collection to get the properties I require, and store in relevant variables which will need to be created:

QueryList2.PNG

 

Finally, I will email the document owner for each item to inform them that the review is due in three months:

SendNotification.PNG

 

The completed workflow looks like this:

WF1.PNG

WF2.PNG

Publish the workflow.

Now, the clever bit.  This workflow needs to be scheduled to run daily, forever.

Settings > Nintex Workflow 2013 > Schedule Site Workflows > Add Schedule

Complete the schedule as follows:

Schedule.PNG

Is there a way to do this by grabbing only the most recent date entered if it's older than 14 days?  I have 4 col: Emp, ReviewTopic, Reviewer, and ReviewDate.  I need to send an email to each employee if the last (most recent entered) review date is older than 14 days.  Been racking my brain and these forums for a few days now.  I can get it to email each employee (regardless of the last date entered) or not at all.  Thanks in advance


Can you use sort order on query list to make sure most recently modified is at the top. Then look at that date to see if more than 14 days? Have you posted a question relating to this? If so please link it here and I’ll take a look.


I did but deleted it and then not even 30 minutes after I posted the reply above I was given some information that fixed the issue.  I will post the wf and the fix in the morning. Thanks for the quick response.  I actually modeled it off of a few posts you made.

Thx


The issue I was having ultimately was the person/user account info.  Once I set the user to display name and then used CAML (removing 'LookupId="TRUE"') in my nested query my wf worked perfectly.  Again thank you for your past examples.


Are you getting the same error message as seen on my screenshot above?
If do, then do what I suggested:

update the vListIDProcedureID from List ID to Single Line Text.


I think at some point I may have done that. I have written several workflows for items coming due and so far all are running ok. My new "issue" is a soap: error.  

Thanks again. 


Cassy Freeman‌ 

I've created WF on nintex, the first reminder is working. I defined the To (Owner) and the Owner received the email. But the second reminder Owner not able to receive the email. the 2nd notification I used the site WF to schedule the timing. Any help is much appreciated. Thank you


Gel G‌ please can you create a new question on Getting Started‌ with some screenshots and I (or others) can help.


How did you do that? I'm trying to include a link to the item but I have not had much luck. I'm creating a site workflow to run every day.


What are you trying to link to? I cannot find the post/thread with the question.


To display the form you have to add the ....DispForm.aspx?ID= {The item ID variable}

But you have to add it at the end of the path for your list:

https://teams.piedmontng.com/sites/Transmission/Lists/Dew%20Point%20Meter/AllItems.aspx

https://teams.piedmontng.com/sites/Transmission/Lists/Dew%20Point%20Meter/DispForm.aspx?ID=I normally add that pat in the body of the email using the INSERT Link option. The address with the DispForm address goes in the address section. I normally create an ID variable if I am creating a site workflow. This is the variable goes after the =.


This site workflow solves so many issues.  Thank you very much for all of the detail included.


Thanks for all the work on this workflow example but I've got a minor issue with the For Each Item loop. It's going thru the loop twice for every item in my list. I saw this comment on 11-1-17 and I'm wondering if this might be part of my problem. I did create a List Item ID variable called ListIDProcedureID. I'm not sure what the comment from 11-1-17 meant by "List ID instead of text".



 



11-1-17: 



I think it was a problem with the vListIDProcedureID being a variable > List ID instead of text.



When I chosen a different variable set a text, the workflow works now.



 



I am yet confused what the FOR EACH does ??
Is it supposed to check how many items are about to expire and then send individual email for each??



 



I had an impression that it would show a list of all potential expire items on one email instead of multiple emails.


Hello,



 



This is working great up to the last For Each.  What does the log in history do and since I didnt add that to my workflow that may actually be my issue.



I'm not surew how to set that up.



 



Thanks



Tim



 


Thank you so much for providing detailed step explanation.  For beginners like me, it is invaluable!


I followed the instructions and got it to work...I've tried many much more complex solutions to no avail.  So my question is...I want to do parallel actions and have 4 branches going at the same time...30-60-90-120day notifications.  I put my 30day working workflow in an action set and copied it for each branch.  The workflow runs but no emails go out.  I'm wondering if I either need to index or use different collections for each branch.


"Re: Email generated after a renewal date is expected"

Thank you for the great write up on how to do this.  I followed the exact steps and it worked. 


cassymfreeman,



 



Would like to see how we can configured the workflow to send multiple reminders like 30 days before due date and then another one 15 days before due date. 



 



Thanks,
Huey Tran


CassymFreeman - The images on your post are broken. Can you reupload the images so I can see how you configured the actions? Thanks.

 

 


Reply