cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kels89
Helper I
Helper I

Apply to Each added at Create HTML Table step

I'm building a flow where I'm pulling a list utilizing "Get Items" and then creating an HTML table. I have done this before without issue, but today my flow is adding an apply to each when I add the fields for my table. How can I avoid the apply to each and still create a table listing all of the results from my get items action? Once these steps are done, I'm just going to pull the table into an email, but since it's buried in an "Apply To Each", I can't even pull my table into the email.

 

Screenshot 2021-01-27 073514.pngScreenshot 2021-01-27 073233.png

2 REPLIES 2
mobashee
Microsoft
Microsoft

Dear Partner,

You can get the output of action inside apply to each using below expression

outputs('Create_HTML_table_2')

 

Did I answer your question? Please consider to mark my post as a solution to help others.

 

Regards,

Mohamed Sanuj Basheer

Expiscornovus
Super User II
Super User II

Hi @kels89,

 

You can use an array variable and append the results of the individual items to that variable. And use that variable to create the HTML Table outside of the apply to each loop.

 

Below is an example of that.

 

1. Add an initialize array variable at the beginning of your flow

html_arrayvariable.png

2. Add an append to array variable action within the Apply to each loop and use the value - item 

appendtoarray_variable.png

3. Create an HTML table outside the apply to each loop

createhtmltablefromarray.png

 

Hope this helps a bit?

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (105,766)