cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Approval Flow

Hello, 

I created a 3 stage approval flow using the new flow tools, currently I have all three of the results from the previous approvers being mailed to me, I evaluate and if 2 of the 3 approvers approve then I hit the approve button on the fourth approval mail that kicks off the move from my proposed sharepoint list to my approved list and deletes the item in the proposed list. Working amazingly well! What I would like to do is use a conditional paramater to evaluate the result of the first 3 emails so that there is no manual intervention needed. Possible? I guess the question is does the conditional paramater accept an evaluation argument?

10 REPLIES 10
Highlighted
Helper IV
Helper IV

Re: Approval Flow

@equals(body('Send_approval_email')['SelectedOption'], 'Approve')
and
@equals(body('Send_approval_email_2')['SelectedOption'], 'Approve')
or
@equals(body('Send_approval_email')['SelectedOption'], 'Approve')
and
@equals(body('Send_approval_email_3')['SelectedOption'], 'Approve')
or
@equals(body('Send_approval_email_2')['SelectedOption'], 'Approve')
and
@equals(body('Send_approval_email_3')['SelectedOption'], 'Approve')

 

 

Anyone that can help me make something like the above work?

Highlighted
New Member

Re: Approval Flow

 

Format for logical and/or is basically @and(condition, or(condition, condition)) 

 

I don't quite understand what you're doing though, so I'll just leave it at that.

 

Highlighted
Helper IV
Helper IV

Re: Approval Flow

 

When a new item is created in my list I want 3 approval emails to go out, then I want the conditional parameter to evaluate the responses, if 2 of the 3 = Approve then Yes, if not then no.

Highlighted
Helper IV
Helper IV

Re: Approval Flow

Still not quite there...

 

@or(equals(body('Send_approval_email,Send_approval_email_2')['SelectedOption'], 'Approve'), equals(body('Send_approval_email,Send_approval_email_3')['SelectedOption'], 'Approve'), equals(body('Send_approval_email_2,Send_approval_email_3')['SelectedOption'], 'Approve'))

Highlighted
Helper IV
Helper IV

Re: Approval Flow

@Sunay Is Staff available to help, I have been working on this for a while and cannot figure it out! Thanks in advance. I understand if its not possible. 

Highlighted
Power Automate
Power Automate

Re: Approval Flow

@Roberts2727  I think I understand your scenario. Your approval flow basically needs 2 approvals in stage 1 and then 1 approval in stage 2 for the copy to happen.

Let me look into it. I will update the thread soon. 

Highlighted
Helper IV
Helper IV

Re: Approval Flow

@Sunay

 

First stage mails 3 approvers, if 2 of the 3 approve, then I want to move from the proposed to the approved list.

Highlighted
Power Automate
Power Automate

Re: Approval Flow

I checked, the way it works today is that as soon as any one of the approvers approve the flow will continue. This wouldn't work since flows are inherently stateless. 

We do plan to light up the For-each feature very soon (~2 weeks), which will make this scenario possible.

Alternatively, you can choose to store the state in an excel file and if conditions are satisfied copy over the item

Highlighted
Helper IV
Helper IV

Re: Approval Flow

I do not mind storing in an excel file. I will attempt this and get back with you.

Highlighted
Helper IV
Helper IV

Re: Approval Flow

Ok, I have edited the flow to write the results to an excel file with 2 columns named approved and denied, as well as a few other fields like title, assigned to email, and description for tracking purposes.

Next I run a get rows command and specify to retrieve all of the rows in the spreadsheet.

Next I have a condition

 

@greaterOrEquals(body('Get_rows')['Approved'], 2)

 

if yes create item

if no send email

 

Is that the appropriate logic for the condition to evaluate the approved columns?

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 Kudoed Authors
Users online (8,352)