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 / Update SharePoint item...
Power Apps
Unanswered

Update SharePoint item from PowerApps Collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am attempting to add attachments to my SharePoint list (test New Triage Request Form) to a specific record.  I have two screens which have an Edit Form (Form_1, Form_2). Both attachments appear in my collections (TempAttachmentsCol); however, when I run the following Patch, only the Form_2 attachment appears on the SharePoint.

 

Patch('test New Triage Request Form', LookUp('test New Triage Request Form',ID=TempCol.ID),{
},Form_1.Updates,Form_2.Updates);

 

Is there a better way to update the SharePoint record with the attachments in the Collection? Or am I on the right track?  Thank you

Categories:
  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    Hi @Anonymous ,

    Firstly FormName.Updates requires the attachments to be in an attachment control (not sure what you mean with attachments in the collection.)

    I assume you have an attachment control on each  - the problem you have (I did some testing here to confirm this) is that like any field, when Power Apps updates it, the field is overwritten by the current content of the field in the form providing the update.

    In this case, Form_2 would contain any existing (written to the list at the time it was opened) attachments and the new items uploaded to it. It knows nothing about anything you have just done on Form_1, so updates the field with those items and subsequently over-writes anything just changed by Form_1 (this is not just the attachments, but any other common field they contain)

    It is also not much use refreshing Form_2 after submitting Form_1, as this would clear any updated information on it. Your only solution is to submit Form_1 first, then open Form_2 after this and then change and submit it.

     

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 
    Check @RezaDorrani  has a video about attachment in collection and send it off to SharePoint an easy way, also he has a sample of the app he demo, you will never get find better than how @RezaDorrani showing, also he has lots of videos that will help succeed in Building PowerApps  meaning NO delegation issue and performance supersonic 👏 for him .
    Here is the link of video Power Apps SharePoint List Attachments | Save Camera Pictures, Pen Input & Images 

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    Hi @Anonymous ,

    Before you spend time exploring @RezaDorrani 's video, it relates to a completely different subject and far more complex process to what you have posted (and actually involves only one Attachment control). You have asked about sequentially Patching two unsaved forms, both with attachment controls. The easiest solution is what I posted - save Form_1 first and then open Form 2.

     

    Please click Accept as solution 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 Thumbs Up.

    Visit my blog Practical Power Apps

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    If you need patch multiple forms here is a good tutorials  https://youtu.be/9gI9OscTLD0

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    Hi @Anonymous ,

    The last video only has one of each one attachment control and does not solve your problem. The whole idea of multiple forms is to have different fields on each of them, so when you Patch(Form.Updates), nothing  will overwrite something written earlier. You can however use Patch with individual field references on everything but attachments.

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    The best way to test it download the demo app supplied in the demo by PowerApps guru @RezaDorrani  and see it yourself. Rather than confusing information 

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    @Anonymous ,

    I will not continue this side conversation on your thread other than ask that you tag me if you want some actual code and factual guidance rather than hyperlinks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I thank you both for the enthusiastic replies. WarrenBelz was very close to the solution. His comments made me relook at the patch. I created a second patch so each form had it's own and it worked.  Also, I have viewed many of RezaDorrani  videos. They have been very helpful. I have also gained a lot of knowledge from Shane Young and Audrie Gordon.  I thank you all for posting these videos. I hope I can continue to come to this Community for answers.

  • WarrenBelz Profile Picture
    156,750 Most Valuable Professional on at

    Thanks @Anonymous ,

    Good to see my analysis of your issue was not confusing to you. What you have done is probably what I suggested (to do them separately)

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard