I have a SharePoint list that is ~1000 items long that stores data for processes. There is a trigger on this data for when an item is created or modified so when a team member completes a process there is a record sent to managers of the process results. I had to add a new column with data in SharePoint to expand the scope of the list. I turned the flow with the trigger off and made the changes necessary to the SharePoint list and associated app. An hour after making the changes I turned the "When an item is created or modified" flow back on and it triggered on all of the changes made (~1000 items) that had been changed while the flow was turned off. Is there any way to make sure that the trigger will only look at things modified after it was turned on?
I am experiencing this. any solution aside from adding a condition which is not a solution but a workaround btw.
@MY and @ScottShearer
I didn't expect it to play catch up either but it had sent out nearly 100 emails before I hit stop. I waited a little over an hour and turned it back on and it picked up where it had left off at and continued through each row ( I removed the email step on the second startup so no additional spam emails were sent).
I can't explain it but it definitely went retroactive...
I wasn’t able to get the trigger filter to work with a greater than or less than equation, but the condition filter works well enough for my needs. I ended up with the condition:
‘Modified’ is less than @subtractFromTime(utcNow(),1,'Hour')
So if I make a large sweeping change I wait an hour before turning the flow on to avoid sending a thousand emails by accident.
Based on what @ScottShearer said you could try a trigger condition. This article I found helpful:
https://www.c-sharpcorner.com/article/flow-trigger-conditions-for-sharepoint-run-flow-when-needed/
But, this still sounds odd to me that if the Automate has been turned off that it still triggers when it's turned back on. What if I have an automate that's been turned off for a month and decide to turn it back on. It's really going to run for every change over the month?
One way might be to include a condition in your Flow immediately after your trigger. The condition can check the modified dates and times. If they were not modified on or after when the Flow was turned on, then exit the Flow.
A more elegant solution might be to put the same logic in a trigger filter.
Let me know if you need an example.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional