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

Wait for an Approval

Hi Team,

 

i have a really hard topic and found no solution.

 

1. My Customer want to get all Approvers to an Array

2. I loop throw the array and create one Approval for each Approver

Reason if someone answer with comments, other approvers should see it during there approval (i write results to a list and add a filtered link to approval mail)

Normally if you write a Approval for a SET of Approvers you get the results at the point all Answers  with APPROVE

 

3. NOW, the customer wants to CANCEL the FLOW if 1 Person REJECT

-->Problem "Terminate" can´t be used if you LOOP in a Array.

 

Idea come back to Standard and create one Approval with all apprivers A@test.de; b@test.de etc.

During FIRST Reject, script will be terminated  OK that is good.

BUT approval results for "approve" comes together when the flow is approved. That was not good 😞

Unbenannt.PNG

 

I read the whole day in the community. There is no BREAK and Cancel possibility in Flow.

 

I tried to use "create Flow" and "wait for a Flow" but this does not WORK !

i get the ID from Flow but it doesn´work.

 

Some ideas????

 

Unbenannt.PNG

 

GOAL:

 

1. Create a Flow with list of approvers

2. if 1 approver makes an approve, save the comments in a list

3. if 1 approver REJECT, than Stop the flow

 

Sounds simple but it not possible i think.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Member

Re: Wait for an Approval

I found a solution

 

Creating a string variable and a do while loop- Setting approval on FIRST ! Than i loop as long a @ was in the string.

By reject String = empty by approve write element and replace email 😉

 

IT WORKS !

 

Unbenannt.PNG

View solution in original post

3 REPLIES 3
Highlighted
Dual Super User II
Dual Super User II

Re: Wait for an Approval

I do this by creating a control variable at the start of the Flow to track whether the item has been rejected. Then as I loop through the approvers I set that variable as soon as one of the approvers rejects.  There is a condition that checks the status of that variable on each loop.  So if one approver has rejected the item then the loop skips that particular cycle.  When the loop finishes I set the approval status to Approved or Rejected based on the control variable.  Here's a screenshot

 

screenshot.png



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

Re: Wait for an Approval

I found a solution

 

Creating a string variable and a do while loop- Setting approval on FIRST ! Than i loop as long a @ was in the string.

By reject String = empty by approve write element and replace email 😉

 

IT WORKS !

 

Unbenannt.PNG

View solution in original post

Highlighted
Community Support
Community Support

Re: Wait for an Approval

Hi @thomascz87 ,

 

Great! It appears that you have found a solution to your issue!

If so, please click "Accept as Solution" and mark the post as Solved!

This makes your post much easier for other members of the community to see and find when looking for a solution!

 

Best Regards,

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.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (5,336)