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:The 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?
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.
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
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.
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.
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.
User | Count |
---|---|
142 | |
142 | |
76 | |
73 | |
71 |
User | Count |
---|---|
231 | |
170 | |
74 | |
67 | |
60 |