cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chriss1982
Helper I
Helper I

Issue with Multi Step Approval Flow

Hi all, 

I want to create a Document Approval Workflow for Sharepoint. The requirement is, that when an approval instance has rejected, the approval request should go one step back to the approval instance before like approval instance 2 has rejected it should go back to instance 1.

It works for approval 3 to go back to 2 but it did not work for approval 2 to go back to approval 1. In this case the approval 2 instance got the request again.

I guess  the "Do until" is not place correct?

The outcome of "Do until 2" is based on approval 3 and the outcome of "Do until 1" is based on the outcome of approval 2.

grafik.png

 

Any suggestions?

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

Could I suggest a slightly simpler design?  Create two variables. The first is an array of Approver emails that you want to use.  The second is an integer that records the Approval step to be processed and intialize it to 0. Then start a Do Until loop that will run until Approval step is greater than 3 or less than 0. In the Loop send an Approval to the approver in the array using the Approval step as an Index.  When the response is returned increment the the Approval step if it was approved and decrement the step if it was rejected.  Then loop.  The Loop will continue until either the first person in the Loop rejects the approval or the last person in the Loop approves.



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

Hello @Pstork1,

 

thansk for your reply.

 

I´m not sure if I got this completely.

If I count the loop and have just one loop, how it is to suppose to just step one back?

E.g. if approval instance 3 has rejected it will not reach the value 3 and the loop will begin again at the top, or?

 

 

Here's a table that tracks through what a potential set of Loop runs would look like for the following Array of Approvers.  "Approver1, Approver2, Approver3" with a starting value in Approval count of 0

 

Loop Number          Count        Is Count < 0 or >= 3         Approver         Result        Count after Response

1                                 0                            No                      Approver1    Approved                   1

2                                 1                            No                      Approver2     Reject                        0

3                                 0                            No                      Approver1    Approved                   1

4                                 1                            No                      Approver2    Approved                   2

5                                 2                            No                      Approver3    Approved                   3

6                                 3                            Yes                         *** Loop Exits ***

 



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

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!

Top Solution Authors
Top Kudoed Authors
Users online (4,654)