Announcements
Could someone please explain why I have just been unable to patch items from a Gallery back to a Dataverse table with the PATCH function, but with COLLECT it works?
Many thanks!
Hello @jed76 ,
Depends, how are you using "Patch()"?
To create a record with "Patch()", use:
Patch( source, Defaults(source), record )
Hi @jed76,
Patch() and Collect() can both be used to add a record to a data source.
Typically Patch() is used to modify entire records or the values of specific fields in a record, however when used with the defaults function it behaves in a similar way to Collect().
An important difference is Patch() can only add to an existing collection whereas Collect will create the collection if it doesn’t already exist.
So use Patch to amend records in existing collections and Collect to define a new collection. Patch is also more suitable for amending a subset of fields in a collection.
Many thanks. I couldn't understand why Collect would work, but Patch wouldn't. This was for patching/collecting BACK to a data source, not TO a collection.
Too few details to figure it out.
You don't tell the detailed scenario, I just give a example for reference.
Thanks. I'm beginning to think that not using collections is a better way to go if they can be avoided. I've just changed my app to work on the live data instead and it seems so much simpler.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 248 Super User 2026 Season 2
WarrenBelz 192 Most Valuable Professional
Mohsin Ali 135