cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Do until do not working properly

Hi community,

 

Recently, I was creating a new flow to use as a approval flow following a simples list on my SharePoint.

 

The ideia is, while an item is with "Pending" or "Select" value, the loop makes a follow up every 1 hour (at the screenshot is 30s jut to test), but after I change the field to another option, the loop continous and don't get out of it. I've been tried a lot of different ways, and get only to ways:

#1 the loop goes forever, and the value that I change is irrelevant

#2 the loop repeat just 1 time and goes out of it

 

Capture.PNG

8 REPLIES 8
Super User
Super User

Re: Do until do not working properly

Hi

I guess the dynamic content "Capacity requir..." evaluated in the Do Until is taken from the Trigger and is not updated, unless you declare a variable before the do until, initialize it with the value coming from the trigger, use this variable in the Do Until instead, include inside the Do Until a Get item, then set the variable value to the dynamic content "Capacity requir..." obtained from "Get item".

 

In such a case, I would also move "Send email" after the Do Until, ensuring it is executed due to the status changed, and not due to Do Until reached any of the limits.

Hope this helps





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





Super User
Super User

Re: Do until do not working properly

Hi again
This post can be useful to understand the relationship between do until and variables

https://www.google.es/amp/s/elbruno.com/2017/05/30/flow-manejo-simple-de-variables-en-microsoft-flow...

Hope this helps




If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





Community Support Team
Community Support Team

Re: Do until do not working properly

Hi @lsasounian,

 

The “Do Until” action would be executed only when “When an item is created” trigger is triggered. You change the field to another option means that you update the item in SharePoint list, but the “Do Until” action would not be triggered again, the field value would not be updated and the “Do Until” action would be exeuted every 1 hour.

 

You could consider change the “When an item is cretaed” trigger into “When an item is created or modified” trigger, the “Do Until” action would be executed when the item is created or modified in SharePoint list, but it would arise another flow run. You shoud view another flow run rather than previous one to check if the loop has gotten out of it. 

 

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.
Anonymous
Not applicable

Re: Do until do not working properly

Hi,

 

Your suggestion doesn't work for me, I've tested this but when I change the value, a new flow is created and I can't leave that.

Above is the new flow that I create. When I create a new item, the flow goes to the IF Yes condition because the value is empty and makes a loop, but when I change the value, a new flow starts and goes to IF No because now the field is filled properly but my point is, the old flow still running. The correct flow is the "Do until" field needs to continuous validate the specific field and go out if the condition is false and this thing don't happen

Capture.PNG

 

Super User
Super User

Re: Do until do not working properly

Hi!

Can you click on "Edit in advanced mode" in both the Condition and the Do-Until and share the expression inside?

Thanks!





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





Anonymous
Not applicable

Re: Do until do not working properly

@not(equals(empty(triggerBody()?['Capacity_x0020_required']), true))

 

In this case, It's true because the field id empty but when I change the item, the loop still running

Super User
Super User

Re: Do until do not working properly

Is this the expression from the Condition or from the Do Until? Also I was asking for both





If anybody solved your question, remember to mark its post as a solution!

Proud to be a Flownaut!





Anonymous
Not applicable

Re: Do until do not working properly

Sorry bro,

 

The Condition: @equals(empty(triggerBody()?['Capacity_x0020_required']), true)

 

Do Until: @not(equals(empty(triggerBody()?['Capacity_x0020_required']), true))

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: 427 members 4,769 guests
Please welcome our newest community members: