cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
llanderson
Advocate II
Advocate II

Do Until question

I am trying to set up a Do Until loop in a Flow.  Basically I want to wait until a field in my SP list =  a certain value.  I have my Do Until count set to 5 (for testing purposes) and the action inside of my loop is to Delay 20 minutes.  So, in theory this should run 5 times for 20 minutes each before it finishes and continues on with the other steps in the flow.  My problem is that it runs one time (one 20 minute wait) and then jumps out of the Do Until loop and the SP list item hasn't changed.  Am I missing something?  The flow is running when a new item is added to the SP list.  Do I need to do a Get Items or something for this scenario to work?  Thanks.

16 REPLIES 16
v-monli-msft
Community Support
Community Support

Hi,

 

I noticed that you said that "the SP list item hasn't changed", would you please be more specific about what is the next action after the Do Until condition? Maybe a screenshot of your flow would explain more clearly. I will try to reproduce your issue once got the detailed information.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The flow is triggered when a new item is added to a SP list.  The first couple of steps are sending emails.  Then I want it to wait until the Task Complete field = True or Yes (It is a Yes/No field in SP) and then send one last email.  But it jumps out of the Do Until after 1 iteration and the SP field hasn't changed.

 

 

DoUntil.jpg

Was this ever resolved?  I'm experiencing the same problem... Do Until just jumps right through, regardless of the field values.  Seems like such an obvious bug that I feel like I may be using the functionality incorrectly...

 

Thanks!

I have the same issue, like the Do Until dont care what value it has the condition, I was trying to fix this by setting a variable inside the loop but it turns out that, as I`m using an Approval task inside, it doesnt let me save the workflow because approval task cant be under the do until scope unless it is the only task inside that scope.

 

If anybody knows if Do Until just doesnt work, or how I can make happen to have the Approval task inside the Do Until scope with additional tasks on it please let me know.

I am having this same issue as well.

Microsoft has confirmed there is an issue with the Do Until function after discussing with them.

 

I couldn't get it to hold a loop at all when comparing against SharePoint list columns with:
Do Until single line of text is not equal to "particular string"

Do Until single line of text is equal to "particular string"

Do Until Modified Date is not equal to Created Date

Do Until Person's email address is equal to ".com"

Do Until Person's email address is equal to "com"

Do Until Person's email address is not equal to Null or 0

Do Until length(person's email address column) is greater than 0

 

I couldn't get it to stop looping with:

Do Until choice is not equal to "default value"

dountil.PNG

Do Until choice is not equal to "alternate value 1 or alternate value 2"   -

@or(equals(body('Get_Item_"HR_-_New_Hire"_List_Item_-_1')?['Job_x0020_Status']?['Value'], 'FT'),equals(body('Get_Item_"HR_-_New_Hire"_List_Item_-_1')?['Job_x0020_Status']?['Value'], 'PT'))

 

I couldn't find a time where it actually worked as expected.  Not sure how this made it to prod.  I wasted a lot of time on this function expecting it to at least partially work.  If anyone has any success, please let me know how they did it.

 

I am having the same problem with "Do Until". There is no way to specify what approval actions fall inside of it...

RussellClark
Advocate II
Advocate II

+1

 

I am trying to build an incident tracking tool in SharePoint with the ability to escalate the incident to another team.  The workflow I'm trying to build is simple.

 

If the user sets the Escalate field in the list to "Engineering", email me to assign an engineer to the incident by simply editing the list item and specifying the engineer in a people picker.  The trick is I want that email to go out again in 24 hours IF an engineer has not been assigned.

 

My Do until consists of:

  • Limit of 3
  • Condition
  • Send email
  • Wait 24 hours (set to 1 minute then 5 minutes for testing)

 

Tried setting the Do until condition to until the Engineer Assigned Email is not blank:

@Not(Empty(triggerBody()?['Engineer_x0020_Assigned']?['Email']))  IMG1

 

Knowing how notorious people pickers are and the fact that there is no "is/not null" option in flow conditions, I created a text field to use.

 

Set the condition to until EngIsAssigned is equal to Yes  IMG2

 

In BOTH setups, regardless of what was in the people picker field or what text was in the text field when the list item was created, the email was sent 3 times which is the Count Limit I set?  It also didn't matter if I changed the fields after the first email was sent, I got 3 emails every time!

 

 

This feature should be called "Do until count limit is reached, #$@% your conditions"

 

 

 

IMG 1

IMG1.PNG

 

IMG2

IMG2.PNG

Russell,


I've had some luck with the Do Until loop, with help from MS.

 

Here's what I've found.  Don't try comparing it until Blank - change it to something else.  Make a "Please Specify" field or something

 

Secondly, and the more important part - add a Get List Item action after the delay.  Use the column from that Get List Item Action to compare against.  I have had much more success doing it that way.

 

Example:
Do Until Column (from Get list item action after Delay) is not equal to "Please Specify"

Delay
Get List Item to check for updates

 

Side note: I've found the Delay Count parameter to max out at 5000

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,950)