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

How to loop all tables in GetTables function?

I have the following Flow:

 

flow.jpg

I have a "GetTables" function that reads from a specific Excel file. I want to loop through each table and then read all rows from each table in order to make some operations.

 

The "Apply to each" gets the value from "GetTables" function.

 

How can I achieve this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: How to loop all tables in GetTables function?

Hi @Sonhja,

 

Please move the "Select" and the following actions to under the "Filter Array" inside the loop.

 Capture.PNG

 

 

Best regards,

Alice

View solution in original post

Sonhja
Level: Powered On

Re: How to loop all tables in GetTables function?

I ended up doing the complete operations inside the loop, as the Outputs where not visible outside the loop, But this is useful as its is.

 

Alice, thank you for your help. It has been really helpful.

 

By the other hand, I'm trying to compare to a null string, with no luck. I put this code inside a Filter:

 

@not(empty(triggerBody()?['CADUCA']))

In order to filter all not null values in 'CADUCA' column. But with no luck. It doesn't filter anything at all. Any idea?

Thank you!

 

View solution in original post

7 REPLIES 7
Community Support Team
Community Support Team

Re: How to loop all tables in GetTables function?

Hi @Sonhja,

 

If you want to loop through each table and then read all rows from each table in order to make some operations.

 

Please add a "Get rows"action inside the "Apply to each" , and refer to screenshot below to create the flow:

Capture.PNG

 

Best regards,

Alice

Sonhja
Level: Powered On

Re: How to loop all tables in GetTables function?

Hello Alice. Thank you for your answer.

 

With this solution, I can't get the Filter result in a next step. See:

 

flow.jpg

 

How can I get in my "Select 2" the output value of the loop?

 

Thanks!

Community Support Team
Community Support Team

Re: How to loop all tables in GetTables function?

Hi @Sonhja,

 

If you want to use the output value from the Filter Array in the loop, you could move the "Select 2" under the "Filter Array" inside the loop.

 

Best regards,

Alice

Sonhja
Level: Powered On

Re: How to loop all tables in GetTables function?

Hi @Alice

It's not working like that:

flow.jpg

As you can see, I can't see the Output variable...

What I'm doing wrong?

 

Community Support Team
Community Support Team

Re: How to loop all tables in GetTables function?

Hi @Sonhja,

 

Please move the "Select" and the following actions to under the "Filter Array" inside the loop.

 Capture.PNG

 

 

Best regards,

Alice

View solution in original post

Sonhja
Level: Powered On

Re: How to loop all tables in GetTables function?

I ended up doing the complete operations inside the loop, as the Outputs where not visible outside the loop, But this is useful as its is.

 

Alice, thank you for your help. It has been really helpful.

 

By the other hand, I'm trying to compare to a null string, with no luck. I put this code inside a Filter:

 

@not(empty(triggerBody()?['CADUCA']))

In order to filter all not null values in 'CADUCA' column. But with no luck. It doesn't filter anything at all. Any idea?

Thank you!

 

View solution in original post

Community Support Team
Community Support Team

Re: How to loop all tables in GetTables function?

Hi @Sonhja,

 

If your first problem has been solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

And for your question to filter all not null values in 'CADUCA' column, please create a new forum for the issue with the screenshot of your flow.

 

Best regards,

Alice

Helpful resources

Announcements
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 Kudoed Authors (Last 30 Days)
Users online (4,953)