cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhurjati
New Member

Loop Back in Power Flow for Approval

Hi All,

 

I am trying to setup an Approval workflow where by the approver can send back the request to the requestor for revision. upon revision the request should land back at the approvers desk and this process can continue till it is approved by the approver.

 

how can we best accomplish this in power flow, any suggestions/feedback is appreciated.

 

6 REPLIES 6
annajhaveri
Community Champion
Community Champion

@Dhurjati  you could use initialize variable 'approved', and do until loop with Approval action inside do until loop. Do until loop with run until value of 'approved' is not true.  See below screenshot

 

annajhaveri_0-1624887670871.png

 

annajhaveri_1-1624887684092.png

To get through do until time limit refer to this post https://powerusers.microsoft.com/t5/I-Found-A-Bug/Do-Until-only-works-for-1-hour/td-p/59849

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Hi @Ann 

So everything other than the initialize variable should be under the do until loop, please correct me if i am wrong.

i tried the DO Until loop but was not using a variable, was trying to play with the Status column.

@Dhurjati  initialize variable will be before the do until loop, in the beginning of the flow. Also change the limits of do until action as it will timeout in 1 hour.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Hi @annajhaveri 

As you suggested i have use the do while loop, but its strange that even if i am clicking on the approve button the loop is not existed and the approval workflow triggers again.

i have added the flow for your kind perusal, can u pls check and let me know when am i going wrong.

 

Flow 1.pngFlow 2.png

Found the culprit.

The COUNT in the loop condition is the issue, the loop will run as many times it is specified there, in the image below i have specified 2, so the loop ran twice and then existed.

is there are away to by pass this COUNT and let the loop run based on the condition.

 

Do Until.png

@Dhurjati  you can provide count as some maximum number the loop will exit when the condition is true. One mistake i made when i provide you screenshots, you need to check value for true instead of false, in the do until condition, so please change that.

 

What type of condition do you want to make the loop run? The condition where you are checking value of approved variable on do until is the condition, you can add multiple conditions as well using advanced mode.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,331)