cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Collector
Kudo Collector

Get rows from an Excel table and then update the rows

Hello Power Automate Community,

First time using Excel connector. I'm going round in circles and would like some help please.

My business case is:

I have an Excel table with a number of rows. One column is "Status Reason". 

I want to be able to get all rows that have the "Status Reason" which equals "Send Approval Email".

I then want to do several things on each row, such as update it and send an approval email.

I've used the "Apply to each" action, but I only appear to be able to update the first record and it ignores all the others.

Here is my flow. I've deleted all the other actions. What's my next step please?

Excel flow.png

 

Any help would be much appreciated.

Thanks very much,

Garry

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

For anyone who is interested, I've figured this out. I was being an idiot. 

On the Excel Online (Business) action "Get a row" there are two fields: "Key Column" and "Key Value". 

I was using a column and value which wasn't unique.

I should have put another column, such as "IDNumber", and make sure every value is unique value.

Issue solved.

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

hi @GarryPope  please note that apply to each is looking for all of your data

 

next.PNG



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted

Hello @ChristianAbata,

Thanks so much for replying. I added the apply to each, but getting some strange behaviour. 

Here is my Flow:

 

Excel Flow with apply to each.png

 

For testing purposes my Excel table has 3 rows.

I've made two rows have the StatusReason value of Send Approval Email, and the third row something different.

The Flow runs, and only runs through two records, which is correct due to the Filter Query, as above.

But, when I look at the output of the two Apply to each records, it only shows the top row of the Excel file, so it's looped through the first row twice.

 

First apply to each:

 

Record 1.png

 

Second apply to each:

 

Record 2.png

 

Any idea why the apply to each is reading the same record twice?

 

Any help would be much appreciated. Thanks very much,

 

Garry

Highlighted

@GarryPope  could be because you are filtering your data with the value Send Approval Email, so when you do an apply to each is showing you just the values filtered with Send Approval Email value



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted

Hello @ChristianAbata,

Once again, thanks so much for the reply. 

My filter does exactly what you mentioned. I have three rows, two rows have the StatusReason of Send Approval Email. 

The Flow runs twice as it finds StatusReason of Send Approval Email in two rows, but runs through the first row twice, rather than moving onto the second row. Odd.

Thanks very much,

Garry 

Highlighted

For anyone who is interested, I've figured this out. I was being an idiot. 

On the Excel Online (Business) action "Get a row" there are two fields: "Key Column" and "Key Value". 

I was using a column and value which wasn't unique.

I should have put another column, such as "IDNumber", and make sure every value is unique value.

Issue solved.

View solution in original post

Highlighted

@GarryPope  excellent friend. Please mark the post as solved to guide others 😉



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (11,207)