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 / Creating an HTML table...
Power Apps
Unanswered

Creating an HTML table from two connected SharePoint Lists

(0) ShareShare
ReportReport
Posted on by 51

Hi,

How to create an HTML table in power apps connected by two sharepoint lists.

 

In the second sharppoint list I have lines referring to the ID number from the first list. But I don't know how to combine it in the HTML table so that the data assigned to one ID key is displayed in one row in the HTML table.

 

I want all the data that is in the first list and the second list to be displayed according to the ID No. in one table row

 

Best Regards

Nowak

Categories:
  • Commander_Data Profile Picture
    67 on at

    Hi,

    There are various posts online regarding HTML building. Building the HtmlText to be a string on the lines of the simple example below, is one method. HTML tags could be a table, unordered list, ordered list, or description list tags. 

     

    There are some ideas around populating HTML templates that might also be worth looking at (https://powerapps.microsoft.com/fr-be/blog/html-markup-with-dynamic-data/), but this does have some limitations. Until MS relent and allow <style> tags in HtmlText, to add CSS you would need to use inline styling, but can be tedious to maintain.

     

    You will need to replace the list and field names with your own names, and either use a variable for the listOne ID, or use a gallery selected item, etc. in the HtmlText property of your HTML control. Using this example as a seed, you can format the fields, change the tags, and add some inline styling to produce some decent workable results.

     

    With(
    {
     wListOne: LookUp(listOne, ID = <varID>),
     wListTwo: Filter(listTwo, parentID = <varID>)
    },
    "<div>
    <p><strong>Field One</strong>: " & wListOne.FieldOne & "</p>
    <p><strong>Field Two</strong>: " & wListOne.FieldTwo & "</p>
    <table>
    <thead>
    <tr>
    <th>Header One</th>
    <th>Header Two</th>
    </tr>
    </thead>
    <tbody>" & Concat(
     wListTwo,
     "<tr>
     <td>" & listTwoFieldOne & "</td>
     <td>" & listTwoFieldTwo & "</td>
     </tr>") & "
    </tbody>
    </table>
    </div>")

     

  • Nowak Profile Picture
    51 on at

    Thanks for the answer @Commander_Data 

    Is there any other way to create a table from these two lists? I'm looking for a way to do it but I have no idea how to do it.

  • Commander_Data Profile Picture
    67 on at

    Hi @Nowak,

    You may find Reza's article below about nesting galleries helpful. Without understanding fully your requirements and experience, defining an exact solution for you here is not practical.

    You can produce a table within a table using, HTML controls expanding on the above code sample, use Gallery controls, or Table controls with some research. Search for nesting tables in PowerApps should give some further reading material. I hope that is helpful.

     

    https://www.youtube.com/watch?v=25_bdexevGk

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 Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard