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

Do until function

Hello,

I've created a flow: sending email when a new cell "Yes" is added in excel and then to update each cell "Yes" with "No", just to stop the flow.

The flow works somehow -> it sends e-mail, it changes my cells from "Yes" to "No", but still, my run history is always red, due to failures at "do until" function.
The flow looks like this:

1.jpg

2.JPG

 

"Do until" function looks like this:

3.JPG

 

I suppose the problem is with "Current Iteration Index", but without it my flow doesn't loop, until all the cells became "No".

Do you know what could be the problem with my "do until" function?

Thank you!

7 REPLIES 7
Super User
Super User

Re: Do until function

@jeneaMD 

Can you post a screen shot of the error?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
jeneaMD
Level: Powered On

Re: Do until function

Yes, of course.


4.JPG

Error Details: Excel table already has a row with id '0No'.
clientRequestId: 74f3bdce-07a9-467c-98b3-df66cf9477fb

So, even if the flow found another "No" cells, it updates my "Yes" cells to "No".
But still, my flow failes.

Community Support Team
Community Support Team

Re: Do until function

Hi @jeneaMD,

 

Did the structure of the Do until action ever loop? After analyzing the logical structure of your Flow, I think it doesn't seem to loop, I hope I am wrong.

Could you please show the detail of the Variable for text No? According to your description, it seems like an array.

What's the function of variable empty for cells? 

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

 

jeneaMD
Level: Powered On

Re: Do until function

Hello @v-litu-msft

 

Yes, it seems it loop, cause it updates all my values from "YES" to "NO".

Screen with variable for text NO:

1.JPG


Variable "Empty text" I've created to the second condition, so now it is deleted.

My question is "Do until" function should have an end or no?

I mean the loop shouldn't be endless. Isn't that?

Thank you!

Community Support Team
Community Support Team

Re: Do until function

Hi @jeneaMD,

 

I am confused with your requirements that whether you want to update all rows in the table to "No" or update the single row which is Yes. 

If you want to update all rows to "No", you can create List rows present in a table and Apply to each actions to update all rows in the excel file. It can update all the rows and won't be a loop.Annotation 2019-09-10 160712.png

And the error you met is conflict about the column value, it isn't a good way to get rows with "New task?" is Yes. You can use the Filter query to get rows with "New task?" is Yes.

Best Regards,

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

jeneaMD
Level: Powered On

Re: Do until function

Hello, @v-litu-msft and thank you for your reply.

I will test your solution and will return to you with my feedback.

Thank you!


jeneaMD
Level: Powered On

Re: Do until function

Thank you, @v-litu-msft.


I've tried your solution, but, unfortunatelly, it still doesn't work.


In order to recap, I would to like to build a flow that:

1) Deppending on reccurence, will search information in my Shared Excel File (Column "New Task")

2) And when will find one or more cells with text "Yes" in Column "New Task" will send one email per finded text "Yes" and when will find nothing/empty cells in Column "New Task" to do nothing.

3) After sending emails, Flow should update each finded cell with text "Yes" in Column "New Task" with text "No".

 

Here is my current flow structure:

1.JPG2.JPG3.JPG

 

Any update will be helpful.

 

Thank you!

Helpful resources

Announcements
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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,738)