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

Do-until not evaluating condition?

The flow is supposed to work like.

 

File is uploaded > wait for First Approver & Second Approver fields to be filled out > send email to first approver > Approved > send emailed to second approver > Approved > send email to all parties.

 

When I run the flow, it seems like it just skips over the do until, and then fails at the first email because there is no value in the "First Approver" column yet. Am I doing something wrong? Also I should note: If I put a delay within the Do-Until, it just hangs there forever, and the interval is set to 60 and 1H

 

 

 

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Do-until not evaluating condition?

Hi @parmiras,

 

Could you please share a bit more about your SharePoint library?

Are the First Approver column and the Second Approver column the Person or Group type column within your SharePoint library?

 

I think there is something wrong with your “Do Until” action, I have made a test on my side and please take a try with the following workaround:

  • Add a “When a file is created (properties only)” trigger.
  • Add a “Do Until” action, click “Edit in advanced mode”, type the following formula:
@and(not(empty(body('Get_file_properties')?['First_x0020_Approver'])),not(empty(body('Get_file_properties')?['Second_x0020_Approver'])))
  • Within “Do Until” action, add a “Get file properties” action, specify Site Address and Library Name, Id field set to ID dynamic content of the trigger.
  • Under “Do Until” action, add a “Send approval email” action, To field set to First Approver Email dynamic content of “Get file properties” action.
  • Add a “Condition”, left input box set to SelectedOption dynamic content of “Send approval email” action, right input box set to Approve, within middle drop down, choose is equal to.
  • Within “If/yes” branch of “Condition”, add a “Send approval email 2” action, To field set to Second Approver Email dynamic content of “Get file properties” action.

 

Add a Condition 2, left input box set to SelectedOption dynamic content of “Send approval email 2” action, right input box set to Approve, within middle drop down, choose is equal to.

 

Within “If/yes” branch of Condition 2, add a “Send an email” action.

 

Image reference:7.JPG

 

8.JPG

The flow works successfully as below:9.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper I
Helper I

Re: Do-until not evaluating condition?

Hey @v-xida-msft,

 

The First and Second Approver columns are Person or Group Type.  I modified my formula and changed the flow per your instructions, and it still fails after about 30 seconds or so. I'm testing it by leaving both first and second approver blank initially.  I noticed in the formula you gave me, it evaluated the "First Approver" column twice. I changed it to check both and still got an error.

 

2018-01-02_8-49-04.png

Highlighted
Helper I
Helper I

Re: Do-until not evaluating condition?

@v-xida-msft,

 

Any suggestions?

Highlighted
Community Support
Community Support

Re: Do-until not evaluating condition?

Hi @parmiras,

 

If your First Approver column and Second Approver column are both Person or Group type, please consider take a try to change the formula within "Do Until" action of the flow that I provided into following formula:

@and(not(empty(body('Get_file_properties')?['First_x0020_Approver']?['Email'])),not(empty(body('Get_file_properties')?['Second_x0020_Approver']?['Email'])))

Best regards,

Kris

Community Support Team _ Kris Dai
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

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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 (9,718)