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 / Adding multiple photos...
Power Apps
Answered

Adding multiple photos in a gallery with Dynamic content

(0) ShareShare
ReportReport
Posted on by 21

Hello,

 

I am building a inspection/ survey app with combination of Boolean and add picture question. Questions change frequently so, it should be easy to handle in the app and I have decided to follow this video https://www.youtube.com/watch?v=7XXo9wjnJvc where questions are all stored in a list and that list is used via a gallery in power apps to answer them. 

 

The issue I am facing is with the images, the plan is to take the uploaded picture and parse the content to get the Base64 content and then use Flow to upload the image to a SP Doc Lib and get the link back and save this link in the inspection answers field for the images.

 

Image2 --> Show captured/ uploaded image from Add Media control.

Label3 --> B64 encoded content of Image2 as Text

 

As seen in the attachment, when I upload Picture 1, Label3 (B64 encoded image content) is getting set as the same for all the image questions in the gallery even when Image2 is not the same as Image 1. 

 

Is it possible to collect the values in Label3 separately for each image so I can save them in a collection and use ForAll to run the flow and upload them to sharepoint one by one?

 

Any help/ direction is very much appreciated or if I need to explain the problem better.

Ques.jpg
AddMediaBtn_OnChange.jpg
Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Kartik_PA ,

     

    What is the data source and  items property of Gallery1?

    Variable can only store one string, if it is changed, it will reflect on all label3 in gallery. 

    I think you should add a new columns to Gallery's Data source to store the encoded B64 content of image in each row. then you can use ThisItem.B64ContentColumn on Label.Text rather than the variable.

    Hope this helps.

    Sik

     

  • Verified answer
    Kartik_PA Profile Picture
    21 on at

    Hello Sik,

     

    Thanks for taking time to reply.

     

    This post got flagged as SPAM after I initially posted it. So, I posted it differently here and the reply given there worked perfectly for me. Using this:

     

    Collect( colPic, { PicContent: Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", ""), PicName: ThisItem.QuestionID & "_" & AddMediaButton1.FileName } )

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
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard