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

Flow ran successfully, but it keeps starting running again by itself

My Flow is sequential approval where it has two approvers. 

 

The problem is after the first flow ran successfully, it keeps starting running again by itself.

 

The flow keeps starting running by itself after successfully ran previous flowThe flow keeps starting running by itself after successfully ran previous flowSequential ApprovalSequential Approval

11 REPLIES 11
v-bacao-msft
Community Support
Community Support

Hi @deddyandy,

 

If I guess it is correct, the library set in the trigger and Update file properties action is the same, so when the Flow executes the Update file properties action, it creates the conditions that match the Flow trigger.

Because the condition contained in the trigger is that when the file modified, Flow will also trigger, so it is caught in a loop.

 

Best Regards,

Barry

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

Hi @v-bacao-msft,

 

Yes, you are correct. I just received a call from Microsoft support professional, they said the same as you said. Unfortunately, they could not find the solution. They just said that I must not have trigger "When a file is created or modified (properties only)", instead I can only have a trigger "When a file is created (properties only)".

Hi @deddyandy,

 

In fact, I agree with them that if you are targeting only newly created items, you could use When a file is created(properties only) as the trigger.

 

Best Regards,

Barry

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

hi @deddyandy,

I have same scenario for my flows when i update item from flow the flow trigger again as said by @v-bacao-msft , I create a flag column in sharepoint, and trigger flow only flag true 

1.PNG

 

so if you want to not trigger flow again on update you just set Flag Value Yes on update item action

2.PNG

so in this way you flow runs but not inner action if condition is false.

Hopefully this answer will help you.

 

Regards,

Harry_G

Hi @Harry_G,

 

Sorry I am still confused. From your explanation my understanding is when a user creates a file then set the value of Form Value to Yes, in order to stop inner loop. However, when the user edits the file then the Flow will not go to Update item action and also other actions in the Flow? 

 

Regards,

Deddy.

@deddyandy can you please tell me that when your flow will run. on every edit of file properties or you have some condition? 

@Harry_G. I am making the flow for Purchase Order Request. So the workflow is as follows, a user creates a form (Purchase Order Request) and submits it to Purchasing manager for approval. When Purchasing Manager rejects and gives some comments to make correction on the form, then the user will edit the form, and then resubmit the form. This condition may take place several times.

 

Regards,

Deddy.

@deddyandy ok. so I think you have to use some status and flag value. 

create a column Status

add condition @equals(triggerBody()?['Status'], 'FormSubmitted') and if you have use powerapps than you assign defult value of status == "FormSubmitted", So when the edit the form and resubmit it status value automatically change to FormSubmitted 

when you update the item from flow just change the status and assign some other value. flow only runs when status is FormSubmitted i will attached demo flow so you can understand better.

1.PNG2.PNG

@Harry_G OK, so when a file is created the value of Form Value is "No", then when in Update item action, it is set to "Yes", then it will not loop back. Next, when the file is edited, you said that the value is automatically set to "No"? Is it possible? How do you do that?

 

Regards,

Deddy

 

 

@deddyandy  in my scenario i have item list not a document library. So I create a form in power apps and set default value of flag when item is edited from form. 

@Harry_G Sorry it has taken your time. I have not learned power apps. I geuss I just have to accept using only when a file is created action.

 

Thank you.

 

Regards,

Deddy.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,260)