Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Show All Collection Attachment Images in a Gallery

(0) ShareShare
ReportReport
Posted on by

Hi Guys,

 

I've got an attachment control (named AttachmentControl-1) that allows users to upload their attachments (images) and i'd like for them on the next screen to be able to see all images that they've uploaded in a gallery.

 

In addition to this, i'd like the users to be able to use the Camera feature and take a photo or in some cases, several photos and add these pictures to the same collection (which i've named colImages).

 

Thanks in advance! 

Categories:
  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Show All Collection Attachment Images in a Gallery

    Hi @Dave-ITMan ,

    Firstly, I assume you are collecting unsaved attachments ? You will not get any content from saved/uploaded items and therefore no images, otherwise ThisItem.ContentBytes should show the image and yes, ThisItem.Name should show the file name (saved or unsaved).

     

    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

  • Dave-ITMan Profile Picture
    on at
    Re: Show All Collection Attachment Images in a Gallery

    Hi @WarrenBelz ,

     

    Thank you, i've followed your guide and I've uploaded 2 pictures using the attach file button but when I look at the gallery, it's only showing me the names of the files i've uploaded and not showing the images. 2nd point is how do I include any pictures taken with the camera icon to also go into the same collection (colImages) as the rest of the images please?

    What i've done is:
    gallery named galAttachments
    Items property of galAttachments set to colImages
    Image control of the first image in the gallery Image property set to ThisItem.ContentBytes
    Set the Text property of the first label to ThisItem.Name

  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Show All Collection Attachment Images in a Gallery

    Hi @Dave-ITMan ,

    The images should display with

    ThisItem.ContentBytes

    Your process looks very similar to this blog of mine.

     

    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

     

     

  • Dave-ITMan Profile Picture
    on at
    Re: Show All Collection Attachment Images in a Gallery

    Hi @WarrenBelz 

    Thanks for the info, i've had a look and it doesn't seem to be the same scenario i'm looking for. I've already setup a submit button that emails the results and attachments and then use patch to send the results to a sharepoint list and then Flow will move the attachments into the sharepoint list. 

     

    I have colImages which is the image collection and I have AttachmentControl-1.Attachments. Below is the code I have in the submit button but all I want to do is add all of the images from the camera into the colImages so that all of the attachments are together and can view anything uploaded or taken via the camera in a gallery.

     

    ClearCollect(
     colImages,
     AddColumns(
     RenameColumns(
     'AttachmentControl-1'.Attachments,
     "Value",
     "ContentBytes"
     ),
     "@odata.type",
     ""
     ),
     {
     Name: "Signature.jpg",
     ContentBytes: 'Signature-1'.Image
     }
    );
    
    Office365Outlook.SendEmailV2("email@domain.com" , 'Result-Job-Number'.Text , "Hi,<br><br>
    Please see completed form below and attached photos<br><br>
    Regards<br><br>
    
    IT<br></br>",
     {Attachments: colImages}
    );
    Patch(Portal, Defaults(Portal), 
    {
  • WarrenBelz Profile Picture
    146,524 Most Valuable Professional on at
    Re: Show All Collection Attachment Images in a Gallery

    Hi @Dave-ITMan ,

    Most of the first part is in this blog of mine and camera control process in this video

     

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard