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 Apps / HTML Dynamic Table Col...
Power Apps
Unanswered

HTML Dynamic Table Columns

(0) ShareShare
ReportReport
Posted on by 5

Hello,

 

I’m hoping someone can help. I am trying to create a HTML table with dynamic columns.

 

Background: I have a SharePoint list that contains readings from our data center power equipment. It is possible that 2 records will be related, but not always. The related records will have the same text in a column named “parenttkt”.

 

Current Status: I have a gallery holding the SharePoint list records in PowerApps. I built a HTML text form that displays the data of the selected gallery item. See code and Figure 1.

"<!DOCTYPE html>
<html>
<body
<h2 style='text-align: center'>Command Center</h2>

<table style='width:100%'>
 <tr>
 <th></th>
 <th>Record 1</th>
 <th></th>
 <th>Record 1</th>
 <tr>
 <td style='width:12%'>UPSA1 Panel:</td>
 <td style='padding: 5px; border: 1px solid black; border-collapse: collapse'>" & Concat(galRptBBCPwrOut.Selected.upsa1panel,Value, "; ") & "</td>
 <td style='width:12%; padding-left: 15px'>Cat Generator Panel:</td>
 <td style='padding: 5px; border: 1px solid black; border-collapse: collapse'>" & Concat(galRptBBCPwrOut.Selected.catgenpanel,Value, "; ") & "</td>
 </tr>
 <tr>
 <td>UPSA2 Panel:</td>
 <td style='padding: 5px; border: 1px solid black; border-collapse: collapse'>" & Concat(galRptBBCPwrOut.Selected.upsa2panel,Value, "; ") & "</td>
 <td style='padding-left: 15px'>Surge Logic:</td>
 <td style='padding: 5px; border: 1px solid black; border-collapse: collapse'>" & galRptBBCPwrOut.Selected.surgelogic & "</td>
 </tr>
 <tr>
 <td>UPSB Panel:</td>
 <td style='padding: 5px; border: 1px solid black; border-collapse: collapse'>" & Concat(galRptBBCPwrOut.Selected.upsbpanel,Value, "; ") & "</td>
 <td style='padding-left: 15px'>Cmd Ctr Lights:</td>
 <td style='padding: 5px; border: 1px solid black; border-collapse: collapse'>" & galRptBBCPwrOut.Selected.cmdctrlights & "</td>
 </tr>
</table>
</body>
</html>"

 

Figure 1:

Current Table.png

 

Problem: If there are related records, I’d to display/add the related record data in the HTML table beside the data from the first. If there is no related record, then I only want to see 1 column. See example/desired outcome below.

Solution Example.png

 

I need the most help checking if there is a related record and figuring out how to grab data from both records (either in the gallery or SharePoint). I considered using Power Automate. Any ideas/help is appreciated!!!

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Take a look at the following Blog:

     

    https://shaheer365.blogspot.com/2024/01/power-automate-dynamic-html-table-with.html

     

    Mark as solution if this solves your issue. Be sure to give a thumbs up

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard