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 / Saving Gallery Photos ...
Power Apps
Unanswered

Saving Gallery Photos With Save Data and Then Reloading Them

(0) ShareShare
ReportReport
Posted on by 93

Hello, 

 

I am creating an app that is essentially a form to send data. It has 15 fields some are date and some are text. I have made it so that a user can click a "Save" button and then close the app and return and their progress on the form still shows up using "SaveData"" and "LoadData". I have a few single images that I have got this to work for. 

 

My issue is there is a point in the form where users might have to upload more than one photo so I have placed a gallery with Upload Image Controls

Screen Shot 2020-10-15 at 8.34.30 AM.png

 

My issue Is how would I build a function that saves all of the different photos to a collection and then be able to pull them back as Im confused with how to do this in a gallery. 

 

Let me know if you need more clarification!

 

Best!

Categories:
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Maxwell123 ,

    If you are using FOrm then you can use the Attachment Control to Upload More than 1 image and if attachment control has any image then display all the images in a small gallery.

    Yes, I can use the collection also for display image.

    OnSuccess of the form you can get all the Image using the below code.

    Clearcollect(ImgColl,LastSubmit.FormName.Attachment);

    and Use that collection as you want.

    Hope this will help you to resolve your issue.

    Thanks

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay





  • Maxwell123 Profile Picture
    93 on at

    Hello! 


    I am not using a form control from powerapps, the app is essentially a form for users to submit data. Here is my proccess for saving the data for the text fields. 

     

    ClearCollect(
     SavedData,
     {
     ID: "1",
     CurrentDate: CurrentDate.SelectedDate,
     Latitude: Latitude.Text,
     Longitude: Longitude.Text,
     EquipmentNum: EquipmentNum.SelectedItems,
     DOTDate: DOTDate.SelectedDate,
     Mileage: Mileage.Text,
     GPSReport: GPSReport.Selected.Value,
     InspectionBook: InspectionBook.Selected.Value,
     FireEx: FireEx.Selected.Value,
     RoadTri: RoadTri.Selected.Value,
     Notes: Notes.Text,
     TABPhoto: TABPhoto.Image,
     CELLPhoto: CELLPhoto.Image
     }
    );
    SaveData(
     SavedData,
     "SavedData"
    );

     

    This saves all of the current values of all the fields in the form including the single images which works great. From here I load data on start and each field has something like this to check if there is a value in "SavedData":

    If(!IsBlank(LookUp(SavedData,ID="1",Mileage)),LookUp(SavedData,ID="1" ,Mileage),"")

    So If you reload the app after Saving the data whatever you had typed in before you quit will load back up. 

     

    My issue is with working in a gallery. This is a point in the app where a user has to take photos of equipment. It could be as simple as 1-2 photos however some users have to submit 5-8 depending on the equipment. This is where I felt that putting an "AddMedia" button in a gallery would be the best option as they can just keep taking photos. 

     

    The only way I can get the galleries images into a collection is with "PhotoGallery" 

     

    So lets say I have 3 images in the gallery and I click save 

    ClearCollect(Photos,{Photos:PhotoGallery.AllItems})

    From here I can go into my collection and see that the images are in there but I can not find out a way to get these images back in with Load data. 

     

    Again I am trying to Save this collection and then load it back just like the rest of the data. But for the life of me I can not figure out how to pull the pictures back from the collection

     

    Let me know If I need any more of a description of what Im trying to do and I appreciate the help!!!!!!!

     

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Maxwell123 ,

    My understanding is different.
    in my previous post,

    But, it's not possible to upload Image using the collection to SP.

    I am not sure but hope this can be archive using flow.

    Thanks,


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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard