cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
plessor88
Frequent Visitor

Control - Terminate does not end the flow

I have a flow that triggers when an item in a sharepoint list is created or modified.

I built in a control to terminate the flow if a particular field in the item does not contains a certain value.  I only want the flow when a particular value is present.

 

I run the flow and the flow analyzer shows that the condition was activated and that all the subsequent actions were cancelled.  Somehow the flow still executes all the actions anyway even though it tells me that it did not do them.  For instance I receive emails that should not have been sent because the flow was terminated.  I have the analyser screenshot below.  Am I fundamentally not understanding how this works or is there some kind of bug here?

 

flowcapture1.JPG flowcapture2.JPG

As you can see, the subsequent tasks show as "skipped", but they were not skipped, they executed all the steps including sending emails, creating tasks, etc. (there are a lot more stops that I did not upload and all of them show as "skipped")

 

Any Help is appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
plessor88
Frequent Visitor

I figured out what the issue was.

 

My flow is based on a trigger for sharepoint "When an item is created or modified".

Several steps into the flow, I modify that trigger item.

This kicks the flow off again.

I have logic in the flow to terminate this second flow immediately.

The flow analyzer tool lags a bit behind what is actually happening.

I was looking at the trace from the second run of the flow, where all actions are cancelled.

I needed to look at the trace from the first run of the flow, which executed all the actions.

Because the two run within seconds of each other, the analyzer tool was difficult to understand.

 

I feel pretty dumb, but glad I went through the steps to understand what was happening.

View solution in original post

3 REPLIES 3
Dorul
Responsive Resident
Responsive Resident

Hi @plessor88

I didnt try it myself, because i needed a yes or no branch and my actions would continue from there, but i bet thats the problem in your flow.

Try adding new actions in the No branch, considering you want to terminate the flow on Yes branch.

Something like that: (just edited your printscreen)


flowcapture1.JPG

 

 

 

 

 

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





v-yamao-msft
Community Support
Community Support

Hi @plessor88,

 

Do you want to terminate the flow if a field doesn’t contain a certain value? If it doesn’t contain the certain value, terminate the flow, if it contains the certain value, then do the following actions.

From the screenshot, it seems that you didn’t add any actions under the If no branch.

I have made a simple flow for testing, when an item is created/modified in a list, if the Title doesn’t contain “test”, terminate the flow, if no, send an email. It works as expected.

1.PNG

Besides, here is a blog could be your reference:

https://veenstra.me.uk/2018/09/11/microsoft-flow-never-terminate-your-flows-unless-you-like-failure/

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
plessor88
Frequent Visitor

I figured out what the issue was.

 

My flow is based on a trigger for sharepoint "When an item is created or modified".

Several steps into the flow, I modify that trigger item.

This kicks the flow off again.

I have logic in the flow to terminate this second flow immediately.

The flow analyzer tool lags a bit behind what is actually happening.

I was looking at the trace from the second run of the flow, where all actions are cancelled.

I needed to look at the trace from the first run of the flow, which executed all the actions.

Because the two run within seconds of each other, the analyzer tool was difficult to understand.

 

I feel pretty dumb, but glad I went through the steps to understand what was happening.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,263)