cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GarryPope
Impactful Individual
Impactful Individual

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
GarryPope
Impactful Individual
Impactful Individual

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
ChristianAbata
Super User
Super User

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

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

@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

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 

GarryPope
Impactful Individual
Impactful Individual

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

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

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,921)