cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
parmiras
Level: Powered On

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
Community Support Team
Community Support Team

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.
parmiras
Level: Powered On

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

parmiras
Level: Powered On

Re: Do-until not evaluating condition?

@v-xida-msft,

 

Any suggestions?

Community Support Team
Community Support Team

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 195 members 4,122 guests
Recent signins:
Please welcome our newest community members: