cancel
Showing results for 
Search instead for 
Did you mean: 
claire_allen
Nintex Newbie

Do Calculation on Modified plus 1 year

I'm doing a Nintex Workflow on a SharePoint Document library where I would like an email to be triggered on modified plus 1 year.

 

I'm not 100% on how to configure the Do Calculation Action, as at the bottom of the Action I need to create an output.

 

Does anyone have a how to on this please?

Labels: (1)
Tags (1)
0 Kudos
Reply
9 Replies
brianknight
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

A Query list item should work here. I do a similar process to send out warnings when a document is 335 days from creation.  It essentially gives a 30 day warning for someone to renew the document.  Before your query list, you will need to do use the Calculate Date function.  Use the Calculate date to determine if you are one year from today. 

 Capture.JPG

Your variable will need to be a single line of text string.  Now you can perform a query list function that will filter out items in your list that meet your criteria (modified date is less than or equal to) your variable.  In your query list, pull out modified by or created by (depending on who recieves the email) and perform collection operations to narrow down each list item.  The link below has a really detailed look on how to perform the query list action.  I used it when I started creating these types of workflows.

https://community.nintex.com/t5/Community-Blogs/Queries-and-Collections-and-Loops-Oh-My/ba-p/82404

0 Kudos
Reply
claire_allen
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

Thank you @brianknight 

 

I've not used Query lists before so again I'm not sure what I should be doing plus my Nintex looks different to the Nintex actions I see on the links.

 

Add Time to Date i've configured the actions as shown in the image, not sure if this is correct?

Add Time to Date.JPG

 

And the Query List, I'm not sure how I should configure this as it's different to the link you provided.

Query List.JPG

Query List 1.JPG

 

Any assistance would greatfully be received.

 

Thank you

Claire

0 Kudos
Reply
brianknight
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

You probably want to use the Calculate Date action.  That way you can determine if your variable date is one year from today.  My controls are from On Prem Sharepoint 2016.  I think for the most part, all work the same just a little bit of visual difference.  In your query list you will want to filter based on your calculated date.  In my example, I am filtering my list items when the date is 335 days old or older.

Capture2.JPG

Now, you are going to want to collect items from your list that you will need to do your processing.  In my example, I am pulling birthdate, Student Name, school, retention date, and the form title and placing those in their own collection variable.  I don't have maximum number of rows, so I'm not sure exactly what that does.  I'm guessing it will limit the amount of items you can query.  For now, I'd leave that blank if you can.  The next stage is creating the loop so you can now loop through all your collected items.  You will most likely set the loop to be title (you can play around with this to get it the way you like).  Here is my For each loop

Capture3.JPG

I am looping through each list item and storing the result in a separate (single line of text) variable and basing that on an index number.  The index is just a numeric workflow variable.  My next step is to run a series of parallel actions that collect the data from each of the collection variables.  In this series, I'm collecting the child's birthdate, school, and the retention date.  

Capture.JPG

The collection operation will look at the list item is on (based on the index number) and perform a "Get" function.  Here is an example of what I have.  I'm pulling in the birthdate.

Capture4.JPG

The last step is to send an email to the school administration notifying someone is turning 23 in 30 days.  I'm guessing you will need to pull in modified or created by so that you can determine who the notification goes to.  Hope this helps.

0 Kudos
Reply
claire_allen
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

Thank you for the guideance @brianknight ,

I do not have Calculate Date Action, I have "Do Calculation" or "Add Time to Date". also I'm not understanding the query list configuration (sorry). 

 

I'm trying to trigger a workflow when the modified date is 1 year on and send an email reminder to a document owner, really struggling to get a basic configuration to achieve this.

 

Thank you.

 

 

0 Kudos
Reply
brianknight
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

Not sure on your version of Sharepoint, but Calculate Date should be a valid option for workflow.  If you are not seeing Calculate Date, go into Central Admin - Nintex Administration - under Workflow Environment- Action settings.  Scroll down and look for Calculate Date is checked (you'll find it in the Operations section).  

Capture.JPG

Second, you are going to need to setup a site workflow to perform this action.  The site workflow is necessary as it will need to run daily (or how oftern you want) to check through the document library and look at the modified date.  When you query the list, you want to pull in the variables you will need.  At the very least, you will want to pull the Modified By field.  That way when you send your email, you will know who it needs to go to. Title will be handy too so you can send that to the person.  

0 Kudos
Reply
Automation Master
Automation Master

Re: Do Calculation on Modified plus 1 year

@claire_allen ...Your "Add Time" configuration is correct, just list workflow won't be sufficient in your case, you need following setup:

 

  1. Create another column called "Review Date"
  2. Your list workflow will trigger when item is created and also when it's modified
  3. In that list workflow:
    • Using Add Time action, add 12 months or 365 days
    • Using that date, update the current item's Review Date Column 
  4. Create a site workflow:
    • Query that document library and get ID, Review Date, Modified By, Created By in collections
    • For each ID, get the index value 
      • Inside that for loop, run parallel actions and do collection operations and using index value get:
        • Review Date
        • Modified By
        • Created By
      • Add Commit Pending Changes action
      • Put Run If and check if Review Date = Today's Date
        • If it is then send notification to created by, modified by
0 Kudos
Reply
claire_allen
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

Hello @brianknight 

 

I'm not able to get to the Nintex Administration, 

 

@kunalpatel1029 

As you have been mentioning Calculate Dates, what if I add a column i.e "Review Date" which is a calculation [modified]+365, then create a Run If workflow based on this "Review Date" which will be year from modified and if the new date value is = to Today, the workflow will run? then all I have to do is add a trigger "Send Email" to the document owner.

 

Would that work?

 

Regards

 

Claire

0 Kudos
Reply
Automation Master
Automation Master

Re: Do Calculation on Modified plus 1 year

@claire_allen .....I tried to use Modified date with format date to get year from modified date but it didn't worked for me. It was giving me 1899 for all the new items. But you can try and see if that works for you or not. When you create a calculated column then it will work for your current items but also do make sure that it's working for new items too.

Reply
brianknight
Nintex Newbie

Re: Do Calculation on Modified plus 1 year

I would reach out to your Sharepoint Administrator to see about adding that control to workflow.  If the box is checked and it still isn't showing, I'd reach out to Nintex Support.  The calculate date control is real handy. I use it in several workflows.

Reply