Skip to main content

Notifications

Community site session details

Community site session details

Session Id : nVqJjciTa+fWZbsgwcLAtQ
Power Apps - Community Calls Conversations
Answered

Updating an existing record that has images stored as attachments - adding more images

Like (0) ShareShare
ReportReport
Posted on 8 Jan 2025 23:05:45 by 2

I have app that stores test records and part of that allows the user to take images and store them in the record as attachments.  (datacard)

It works fine for a new record with no prior attachments , but i cant get it to work  in a record edit existing record  case

Clicking Take Picture multiple times stores images to the galleryCollection 

If(

    CountRows(galleryCollection)<10,

    Set(

        varName,

        GUID()

    );

    Collect(

        galleryCollection,

        {

            DisplayName: varName & ".jpg",

            Id: varName & ".jpg",

            Value: Camera1.Stream

        }

    )

the new record is then updated using Update for the datacard 


 issue - editing an existing record

where have attachments already how can i add the galleryCollection contents as extra images keeping whats there already?

Ai suggested this

 ThisItem.Attachments & galleryCollection to merge the old and the new but it wont work as its seems to have issue joining these 

  • Verified answer
    WarrenBelz Profile Picture
    146,731 Most Valuable Professional on 09 Jan 2025 at 01:53:17
    Updating an existing record that has images stored as attachments - adding more images
    The part you are missing is to do the initial Collection before the user takes the photo (probably better done at Screen OnVisible )
    ClearCollect(galleryCollection,DataCardValue35.Attachments)
    Assuming that the Items of DataCardValue35 is galleryCollection, it all should work when you submit the form.
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard

Featured topics

Loading started
Loading complete