cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thomascz87
Level: Power Up

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
thomascz87
Level: Power Up

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
Dual Super User
Dual Super User

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.
thomascz87
Level: Power Up

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

Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 85 members 4,922 guests
Please welcome our newest community members: