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 / Showing Attachment in ...
Power Apps
Unanswered

Showing Attachment in Gal by using HTML Text

(0) ShareShare
ReportReport
Posted on by 28

i have a power app and i am using Gallery to show user comments. i have used HTML text to display comments stored in list. i could show all fields except the attachments. how i can amend below code to show attachments attached for each comment

Trim(ThisItem.Comment) 
Categories:
  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @Msamir7777 ,

    Attachments are a Table, so you could use a nested gallery with ThisItem.Attachments - you could then display the attachment name in this with ThisItem.DisplayName, or you could show all the names in your current Gallery with commas in between with

    Concat(
     ThisItem.Attachments,
     DisplayName & ","
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Msamir7777 Profile Picture
    28 on at

    i have added a nested gallery ( Gallery 1) and added "ThisItem.Attachments" in items, but its giving error

    attachment issue.JPG
  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @Msamir7777 ,

    What is the Items of galComments - it needs to be based on the list containing the attachments - or you cannot display them with either of the options I provided.

  • Msamir7777 Profile Picture
    28 on at

    htmlTimeStamp item is to show author name, and time stamp of the header

    imgCommentUser item to show the picture of author

    htmlCommentBody item to show the text from list. i tried to show attachments in this item, but it didnt work

     

    i have tried to add a nested gallery to the main gallery (GalComments) and with " ThisItem.Attachments" in items, but it didnt work also.

    attachment issue.JPG

    attachment issue.JPG
  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @Msamir7777 ,

    Yes, but what is the Items of galComments? It needs to be based on the list containing the attachments.

  • Msamir7777 Profile Picture
    28 on at

    its taking data from a collection, which is linked to the list , but i see that attachment column is missingCollection.JPG

  • WarrenBelz Profile Picture
    156,526 Most Valuable Professional on at

    @Msamir7777 ,

    I will have another go - what is the Items property of the gallery ? Select the gallery and select Items from the top left drop-down and then post the code in the panel to the right. It needs to be based on the list containing the attachments.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am having similar template as shown in your attachment. I am trying to Print the request details and responses as a PDF. As request details and Responses are from separate list. How to show all the attachments in the PDF. I used a for loop to collect al responses and attachments. but could able to get the attachments in html format. But its giving error for the attachments

     

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