I have a field(column) in my SharePoint Library that uses the Modified date and adds 365 days to it. I want to use flow to send an email on that future date to the file owner. Does it look at that field as a date? I was hoping to use a condition, but can't figure it out.
I would do the calcluation in Flow rather than try to get your field to behave as a date (assuiming you are using a calculated column) . Your formula is static so on edit get flowto run and to work this out and write the value back to a date field - and then use this value to do the remaining flow work.
I have provided an example below that may help you.
I am using a recurrence trigger so that the Flow runs once a day. You should verify that you have selected Date/Time for the type of data in the column settings for the calculated column.
I am assuming that you are using a calculated column for the modified date plus 365 - my column is called DateCalc.
I am using two expressions in my trigger - they can also be seen in the comments area.
Also, by default, Get items only returns 100 records. If you will have over 100 records, go to the settings page for the Get Items action ans configure per the screen shot below - you can retrieve up to 5000 items with a standard Flow license.
Thanks Scott, enjoyed your session at the Flow Conference Tuesday!
The flow ran using your condition, but I don't think I understood what it was supposed to do. Is the condition you sent me just converting the Calculated date to a date? I think what confused me was in the addDays formula it added 1 day. I changed that to 365, but think I should have changed the middle drop down to something else. It sent out emails for any dates grater than or equal to today and less than 365 days ahead. We have 4,000 items so it was sending emails to everyone that owned an item. I don't want it to send an email until 365 days from the modified date. Do I create another action?
I apologize for my ignorance. I am new to Microsoft Flow.
In your original post you said the following:
"I have a field(column) in my SharePoint Library that uses the Modified date and adds 365 days to it. "
This implies that you have a calculated column in your SharePoint list.
Do you have a calculated column in your SharePoint list that adds 365 days to the Modified date?
Yes. I have a calculated column in our SharePoint list that I was trying to use in the condition. It is a column named Revalidated Date that adds 365 days to the Modified date. I was trying to use the Revalidated Date from the Dynamic content list.
I am working from the assumption that the Revalidated Date column contains a value that is 365 days from the last modified date.
So, a calculated date column includes not only a date but a time as well. So my conditions account for the time component by saying that the date/time must be greater than the start of today and less than tomorrow (thats why I add 1 day).
In my expressions, I refer to utcNow() which give you the current date and time
I also use formatDateTime wich just formats an existing date (utcNow())
Where I reference DateCalc, you should reference you calculated date/time column (Revalidated Date)
Finally I use addDays() which can add or subtract a number of days from an existing date and format the output as well.
There is another way to go about this but it would require you to manually enter a reference to you column without simply picking it from Dynamic properties as you can in my example.
The bottom line is this: Get items will only return items where the calculated date column is today.
Is you suggestion different than what Scott put together below? How do I do a calculation in Flow to figure this? Like I said to Scott, I am very new to Flow.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.