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

Community site session details

Session Id : f7xIhVngdXCaMjnAqB079u
Power Automate - Building Flows
Unanswered

Building html Table from an apply to each get items loop

Like (0) ShareShare
ReportReport
Posted on 12 Dec 2023 16:29:49 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

I have the same question (0)
  • lbendlin Profile Picture
    8,355 Super User 2025 Season 2 on 14 Dec 2023 at 00:43:54
    Re: Building html Table from an apply to each get items loop

    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 16 Dec 2023 at 16:09:18
    Re: Building html Table from an apply to each get items loop

    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,355 Super User 2025 Season 2 on 16 Dec 2023 at 21:05:04
    Re: Building html Table from an apply to each get items loop

    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 18 Dec 2023 at 17:43:13
    Re: Building html Table from an apply to each get items loop

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard
Loading complete