web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Suggested answer

Show Existing Images and Append New Images to Gallery

(0) ShareShare
ReportReport
Posted on by 5,177 Super User 2025 Season 2
I need to be able to have existing images (stored in a SharePoint Library [col_Images]), appear in Gallery_1, while also allowing the user to be able to use the 'Add Media'
button (black box) to append new image files to Gallery_1, so I can add all of the images to a PDF Viewer.
 
 
Screen 1: Image Gallery


Screen 2: PDF Viewer
I have the same question (0)
  • Phineas Profile Picture
    5,177 Super User 2025 Season 2 on at
    Show Existing Images and Append New Images to Gallery
    @Michael E. Gernaey

    Thank you for your reply.

    Here is a snapshot of the screen with the image gallery and the 'AddMedia' button adjacent (under the black note).

    The screen has the following formula in the 'OnVisible'. This facilitates adding the existing images to the gallery by default.
    ClearCollect(col_All_Resume_Photos,col_Inspection_Photos);
    Collect(col_New_Images,col_All_Resume_Photos);

    The Gallery Items has - 
    If(RPIPS_Photo_Type_Radio.Selected.Value = "Track Photos",
        Filter(col_New_Images,Inspection_Number = RPIPS_Inspection_Number_Fld.Text,
        !IsBlank(Photo_Type) && Photo_Type = "Track Photos"))

    The AddMediaButton 'OnSelect' has the following formula, allowing the user to append
    new images to the gallery with the existing images.
    If(RPIPS_Photo_Type_Radio.Selected.Value = "Track Photos",
    Set(
        varInspectionPhotoName,
        GUID()
    );
    Collect(
        col_New_Images,
        {
            DisplayName: RPIPS_Image_Description_TI.Text & "-" & RPIPS_Inspection_Number_Fld.Text & ".jpg",
            Id: varInspectionPhotoName,
            Name: RPIPS_Image_Description_TI.Text & "-" & RPIPS_Inspection_Number_Fld.Text,
            Inspection_Number: RPIPS_Inspection_Number_Fld.Text,
            Photo_Type: "Track Photos",
            Value: RPIPS_Add_Uploaded_Photo_Media_Button.Media,
            Url: RPIPS_Add_Uploaded_Photo_Media_Button.Media,
            ImageDescription: RPIPS_Image_Description_TI.Text
        }
    )
    );

    There is a Review Image button on the screen that has the following formula, which navigates the user to the next screen
    to review the images before completing the process.
    ClearCollect(
            col_Final_Inspection_Track_Photos,
            {
                DisplayName: RPIPS_Image_Description_TI.Text & "-" & RPIPS_Inspection_Number_Fld.Text & ".jpg",
                Id: varInspectionPhotoName,
                Description: RPIPS_Image_Description_TI.Text,
                Inspection_Number: RPIPS_Inspection_Number_Fld.Text,
                Photo_Type: "Track Photos",
                Value: RPIPS_Add_Uploaded_Photo_Media_Button.Media,
                ImageSource: RPIPS_Add_Uploaded_Photo_Media_Button.Media,
                ImageDescription: RPIPS_Image_Description_TI.Text
            });

    The existing images (+ and Power Apps) and the new image (girl) do appear in the review gallery. A
    s you can see, there are two 'ThisItem' commands in the Gallery Items.

    This is the only way I can see all the images. 

    If I use only ThisItem.Value, I can only see the new image (created by the Add Media button).

    If I use only Thumbnail, I can only see the existing images, coming from SharePoint.


    There is a Create PDF Button on the screen with the following formula.
    Set(
        varResumeTrackPhotosReportPDFBlob,
        PDF(
            Resume_RTPG_Container,
            {
                Orientation:PaperOrientation.Portrait,
                Size:PaperSize.A4,
                Margin:"0px",
                DPI: 50})
    );

    This is the PDF Viewer screen. The Document property has varResumeTrackPhotosReportPDFBlob.


    I think there is an issue with the image values being translated into the PDF Viewer.

    As you can see, the viewer makes spaces for all the images but only the image created
    by the AddMediaButton appears.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    49,372 Super User 2025 Season 2 on at
    Show Existing Images and Append New Images to Gallery
     
    I am confused at the design.
     
    I do not see a gallery that shows images, I just see a black box that I am guessing is the image control? or some selector?
     
    What I would have done, was to have an actually gallery, vertically, where all images are listed.
    I would have then have an Add + Button that they would press and then they can either Take a picture, or select one.
    Now you would add the image to the SharePoint Library, refresh the Library Datasource (so your gallery refreshes)
    and bingo now you have all your images
     
    Can I ask what part you are stuck on? I would truly treat this like any other "document" interaction
     
    list all your current values
    add a button for them to be able to add another
    whether you show a "modal window" or you have some side control that appears to add the new image and click save (or cancel)
    Save it
    Refresh the Gallery Items source
    Done
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 1,019 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 436

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 281 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics