cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JKarnesBloomin
Level: Powered On

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?

 

 

 

 

 

 

6 REPLIES 6
Meneghino
Level 10

Re: Patch a Collection - Attachment Error

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

JKarnesBloomin
Level: Powered On

Re: Patch a Collection - Attachment Error

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. 

Highlighted
Microsoft Employee

Re: Patch a Collection - Attachment Error

Hi

 

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.

 

Thanks

Garry Mc

JKarnesBloomin
Level: Powered On

Re: Patch a Collection - Attachment Error

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)

Bonus

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.

Microsoft Employee

Re: Patch a Collection - Attachment Error

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.

Microsoft Employee

Re: Patch a Collection - Attachment Error

Hi

 

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)

 

With:

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

 

Let us know if this resolves your issue.

 

Thanks.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,225)