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 / Assign multiple images...
Power Apps
Unanswered

Assign multiple images to specific parent record and link gallery to that record

(1) ShareShare
ReportReport
Posted on by 116

Hi There,

 

I am a really struggling to find help on this, and I'm sure there must be a solution, any help would be most appreciated!

 

Scenario:

 

I have created a basic app which displays Excel data as multiple records (rows) within a Browse Gallery, some basic identifying columns (datacards) are shown. Each of these records can be selected to open up a Details Form Screen with other columns that are visible. I also have the option to open an Edit Form Screen, to change some values and when I click "Submit" that data is passed back into Excel, and the columns are adjusted accordingly with my values. Fine...

 

Into this Edit Form Screen, I have added an Add Picture control, which adds pictures to a Collection, and created a gallery in the Details Form Screen, which shows the pictures I have uploaded. However, the same pictures appear in every Details Form Screen, regardless of which record I click on. It simply shows whats in the collection. They are not 'tied' or specific to each record, in the same way text data is linked by a datacard.

 

What I want to achieve:

 

Imagine an app where I go to a specific location, open up the record for a specific stock, and am able to take some photos and record some data, which all gets turned into a complete report of that stock.

 

With this in mind, I would like the app to be able to open up a specific record, and using an Edit Form Screen add some pictures to that specific record.

I then need a gallery on the Details Form Screen of a specific record to show those pictures that were added to that record.

Ideally I need also to be saving those photos on a shared folder on SharePoint, with a URL recorded on a table in Excel. 

 

Questions:

Am I missing something obvious?

Do I need to make a Collection for each record, and if so how?

 

Many Thanks

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @maxtarneberg,

     

    Taking photos with the Camera control should work.

     

    Could you please share more details about how you configured the collection with the controls?

     

    When working with the Add Pocture control, the Image files is saved in Apps with Relative path, once image changed, the previous one would be replaced, I think your issue should be related with this.

     

    For saving captured image into SharePoint, please check:

    Solved: How to save captured images in SharePoint

     

    More readings:

    Add images to Excel from PowerApps

     

    Regards,

    Michael

     

  • maxtarneberg Profile Picture
    116 on at

    Hi Michael,

     

    Many thanks for your response.

     

    I am keen to use the Add Picture control because it is more flexible and uses the in-built device camera UI. I have tried the Camera control, and face the same issue. Also it is more awkward for me to test because my PC doesn't have an in-built Camera. 

     

    I have an 'Add' button whcih takes the uploaded image with an OnSelect to add to a Collection called MyPicture:

     

    Collect(MyPicture,{Photo:UploadedImage1.Image ,  FileName:"boo.jpg"})

     

    I feel that if I could configure the FileName to be some Data which identifies it plus Date, then I can later configure a Gallery to Filter to only show Items whose FileName contains the relevant Data.

     

    Is this possible or a good way to go? and if so how?

     

    Unfortunately I am unable to create a SharePoint List due to organizational restrictions.

     

    Many Thanks,

    Max

  • maxtarneberg Profile Picture
    116 on at

    Hi Michael @v-micsh-msft

     

    Many thanks for your response.

     

    I am keen to use the Add Picture control because it is more flexible and uses the in-built device camera UI. I have tried the Camera control, and face the same issue. Also it is more awkward for me to test because my PC doesn't have an in-built Camera. 

     

    I have an 'Add' button whcih takes the uploaded image with an OnSelect to add to a Collection called MyPicture:

     

    Collect(MyPicture,{Photo:UploadedImage1.Image ,  FileName:"boo.jpg"})

     

    I feel that if I could configure the FileName to be some Data which identifies it plus Date, then I can later configure a Gallery to Filter to only show Items whose FileName contains the relevant Data.

     

    Is this possible or a good way to go? and if so how?

     

    Unfortunately I am unable to create a SharePoint List due to organizational restrictions.

     

    Many Thanks,

    Max

  • SC05 Profile Picture
    12 on at

    Hi @Max , I have the same requirement and I havent found a good solution yet, did you find anything useful ? Could you please suggest me if you did?

  • maxtarneberg Profile Picture
    116 on at

    Hi @SC05 

     

    So I used an Import button in the end with this. And added this code on its On Select property.

    This places it in a collection [colPhoto], and adds a load of data to identify it, which is already taken from elsewhere in the apps flow, and put in text boxes. At the end it builds a unique filename for each image.

    I have a similar code behind the native app camera, but MyImage:Camera1.photo

     

    Concurrent(
    Collect(
    colPhoto,
    {
    MyImage: UploadedImage1.Image,
    ContentBytes: Camera1.Photo,
    VisitFK: DCNewVisitID.Text,
    SiteFK: lblSelectedSiteID.Text,
    Grower: lblSelectedGrower.Text,
    Variety: lblSelectedVariety.Text,
    Location: PhotoLoc.Text,
    Notes: txtNotes.Text,
    Taken: Today(),
    Method: "Import",
    Name: Concatenate(

    lblSelectedSiteID.Text,
    ".",
    First(colPhoto).VisitFK,
    ".",
    lblSelectedGrower.Text,
    ".",
    lblSelectedVariety.Text,
    ".",
    Text(
    Now(),
    "[$-en-US]dd/mm/yyyy hh:mm:ss"

    Then I have my gallery with Items on the camera screem, filtered to match the 'VisitFK' identifier added earlier:

    SortByColumns(
    Filter(colPhoto, DCNewVisitID.Text=VisitFK),"Taken",SortOrder.Descending)

    From here the Collection can be uploaded to your data source

     

    I hope this helps

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard