cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BigE
Helper II
Helper II

Cancel Running Flow on Field Value Update

The Flow that is triggered is based on a status value field. On status of Complete, I have it send an email to the user then delay for 7 days before archiving the list item and deleting. A requirement is needed to be able to change the status to Reopened. If I do this, a new Flow run happens as expected. What I would like to be able to do is cancel the previous Flow based upon the status value of Reopen.

10 REPLIES 10
ScottShearer
Super User
Super User

@BigE 

Insert a Get Item action after the delay in your Flow and retrieve current data from the list item.  If the value of the Status is Reopen, use a control terminate action (with success) and end the Flow.  Otherwise, proceed and archive/delete the item.

 

Let me know if you need an example.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer I get what you are saying here, I just don't believe it is going to work for my situation. I've setup a switch step for the status value to run on Complete. The delay step is there to write a value to another list after 7 days and then delete this item. If someone changes the status from Complete to Reopen, the Flow will not know about that and will run a new instance leaving this one running the delay. The thing with this one is that the status will go from Reopened back to closed which will trigger this process again.

@BigE
What I propose is that you re-check the status value immediately after and below the delay with a new Get Item action and before the delete action. You will know if the status is reopen and can terminate the Flow. This will work in the situation as you have described it. Please give it a try.


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer 

Will this work in a switch case? It's looking at Completed, not Reopened. I might be just overthinking this. If you still have an example, please send it to me. This it what my steps look like.

Flow.PNG

@BigE 

Please take a look at the screen shots below and let me know if you have additional questions.

Work Orders 1.jpgWork Orders 2.jpg

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer 

I added this step but it still will not work. What happens is that when the status goes from Reopend back to Closed, a new Flow process kicks off and the old Flow is still running. I need to have it check an ID somewhere and terminate the orininal Flow.

@BigE 

Please post a screen shot of your Flow in Design view as currently configured.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer 

This is how I originally configured the flow. There is one other switch case for In Progress that is not in the view.

Flow.PNG

@ScottShearer 

What if I added a 'Do Until' step to buffer the status change?
Flow.PNG

@ScottShearer 

Thanks for all of the assistance with this. I decided to punt and just remove all of the steps from the schedule to deletion of the list item. I created a new Flow that will run a daily check to see if there are any 'Completed' list items older than 7 days and it will copy those to a secondary list and delete the source items. Thanks again for your responses.

 

-Eric

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,109)