Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Patch a Collection - Attachment Error

I am trying to Patch a Collection (which is based on a SharePoint List) using Form.Updates.  When I try to run the patch, I get the following error:updateerror4.pngThe Collection is created by doing a ClearCollect on the Datasource, which is a SharePoint LIst.  I have looked at the collection and confirmed that This column is not added by the ClearCollect (Seems to be the only column not added).  Thoughts?







Community Champion
Community Champion

Are you trying to patch a collection to a sharepoint list to create new items or to edit existing ones?

Right now I'm trying to just patch the collection stored inside PowerApps with Form.Updates.  I'll eventually Patch it back to SP.


So, I'm doing a ClearCollect on My SharePoint List, which get the SP List Schema, I also have a Form on my Page that uses the SP List as the Datasource.  I want to take the updates made in the Form and Patch it to a specfic record in my collection, but I get that attachment error, which I assume is related to the new Attachment functionality recently released. 




Can you provide more detail on the formula you're using to do the patch. If possible provide the key steps you're using that reproduce the issue.



Garry Mc

Here's how you can reproduce it:


1).  Add a SharePoint Online list as a Datasource (Any will do)

2).  Create a new Blank App and connect to the Datasource

3).  Add 2 Forms on to the page, set thier Datasource to your SP List, set the mode of the Forms to New

4). Add 2 New Buttons on the Screen.  Call them CCButton and Patch Button

5). Set the OnSelect property of CCButton to:  ClearCollect(Coll1, Form1.Updates)

6). Set the OnSelect property of Patch Button to :  Patch(Coll1, First(Coll1), Form2.Updates)


7). Instead of using Patch, watch it blow up the same way using UpdateIf:  Change Patch Button OnSelect to:  UpdateIf(Coll1, true, Form2.Updates)


With Patch, it actually shows the {Attachment} column is the problem, this error wasn;t available in UpdateIf, it was just more generic.

Thanks for the details - I'm able to reproduce your issue. I'll get back with the results of my investigation when I know more.



We've identified this as a bug and have created a bug to track this issue. In the meantime, if you specify each of the fields individually this should resolve your problem. We understand this is not ideal, but it should help you in the short term while we work on fixing the issue.


So replace:

Patch(Coll1, First(Coll1), Form2.Updates)



Patch(Coll1, First(Coll1), {field1: Form2.Updates.field1, field2: Form2.Updates.field2, ... })


Let us know if this resolves your issue.



Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (34,967)