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 / List gallery items in ...
Power Apps
Answered

List gallery items in HTML

(0) ShareShare
ReportReport
Posted on by 580

Hi All, 

 

I would like to list gallery items in a HTML pdf output file. 

 

I have a gallery [Gallery4] and it has a one to many relationship based on:

Filter('Staff Secondments',Ref_x0020_ID = gblSelectedEmployee.ID)

 

So i would like to display all the filtered items in my HTML form - Any ideas how to achieve this? 

Categories:
  • Verified answer
    cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    I do this to create html email reports. You utilize a html text control, plug in the HTML and you can utilize things like this concat( filter, for your gallery items source, and then use the fields and encompassing html to have it build out a list in a table. Here is an example section of a table in one of my e-mail I sent out for our Benefits enrollment listing in a table primary beneficiaries inside html text control that is used in an send e-mail connector. The stuff surrounded by &'s is the columns from the datasource.

     

    In your case you would use that if it's e-mail or send it via flow or something to wherever it needs to go. 

     

    <tr>" & Concat(
    PrimaryBeneficiaries,
    "
    <td style=""width: 111.05pt; border-top: none; border-left: solid white 2.25pt; border-bottom: solid white 2.25pt; border-right: solid white 2.25pt; padding: 1.45pt 5.4pt 1.45pt 5.4pt;"" width=""148"">
    " & FirstName & " " & LastName & "
    </td>
    <td style=""width: 50pt; border-top: none; border-left: solid white 2.25pt; border-bottom: solid white 2.25pt; background: #F2F2F2; border-right: solid white 2.25pt; padding: 1.45pt 5.4pt 1.45pt 5.4pt;"" >
    Primary
    </td>
    <td style=""width: 150.65pt; border-top: none; border-left: none; border-bottom: solid white 2.25pt; border-right: solid white 2.25pt; background: #F2F2F2; padding: 1.45pt 5.4pt 1.45pt 5.4pt;"" width=""413"">
    <p style=""margin: 1.0pt 0in 1.0pt 0in;"">" & Relationship & "</p>
    </td>
    <td style=""width: 70.45pt; border: none; border-bottom: solid white 2.25pt; background: #009FDF; padding: 1.45pt 5.4pt 1.45pt 5.4pt;"" width=""94"">
    <p style=""margin: 1.0pt 0in 1.0pt 0in;""><strong><span style=""color: white;"">" & Percent & "</span></strong></p>
    </td>
    </tr>

     

     

     

    But essentially this is "Looping" using concat, which builds the HTML entries for each item in the datasource. 

  • AdamH Profile Picture
    580 on at

    @cwebb365 

     

    Thanks for that. I managed to put this together for my PDF output and it worked out well. 

     

    <h3><span style='color: #333399;'>Secondments</span></h3>
    <table style='border-collapse: collapse; width: 100%;' border='1'>
    <tbody>
    <tr>
    <td style='width: 100%;'>" & Concat(Gallery4.AllItems, 'Seconded Start' & " - " & 'Secondment Finish' & " - " & 'Seconded Line' & " - " & 'Seconded to'.Value & "<br>") & "</td>
    </tr>
    </tbody>
    </table>

     

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard