web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Building html Table fr...
Power Automate
Unanswered

Building html Table from an apply to each get items loop

(0) ShareShare
ReportReport
Posted on by 4

I have a flow that for a selected item will get the item details, find a lookup field with multiple values, then, in an apply to each loop get the items and three column/field values for each row that matches the title of the lookup field in the orignial list. Then, it will create an HTML table of those three fields for that specific row, send it to an array variable i initialized outside the loop, and when I try to create an HTML table of the looped data I get an error. 

 

I cannot figure out how to pass the HTML from the loop outside the loop and then bundle it back into a single table so I can email the combined table. 

 

Please help. 

** I've tried multiple ways to append the variable as a string and as an array, so I have two labeled variables initialized because I've tried both so many times I'm sick of deleting and creating them over and over. 

 

Screenshot 2023-12-12 102217.pngScreenshot 2023-12-12 102226.png

Categories:
  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    You will need to decide if you want to let Power Automate create the HTML table for you, or if you want to hand craft the code.  You can't have both.

  • jnapolski Profile Picture
    4 on at

    As a total novice, I'd like Power Automate to create the HTML table. 

     

    How do I do that in the context of what you're talking about and how does that relate to the flow I've created?

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    You would need to create the array first - in the loop append rows to the array - and then after the loop finished you use the array as the source for the HTML table. (What did you try to use?)

  • jnapolski Profile Picture
    4 on at

    From my understanding I used get items, then select to choose the column fields that I wanted for each row that was filtered by the get item ID. Inside the loop I had gift items, select, create HTML table, compose, append to array. Outside the loop and above it I initialized A array variable. Are you saying that instead of doing a create HTML table inside the loop I should send the values from the select function to the append array variable? When I did that I got errors. I got it to work somewhat where it lists individual tables outside the loop but I can't figure out how to create a single table for each new row.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard