cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Patch multiple records in CDS with a single call

Hi 

I'm trying to Patch multiple records in a single call Without using ForAll (reference link below).

I'm unable to pass a table type as a parameter in the Patch command, it gives an error "Invalid Argument type (table), expecting a record value instead".

 

To create multiple records in a single call, I was able to use Collect(DataSource, Table), but not patch. 

 

To sum up, I have 2 questions:
1. How do we update multiple records with a single Patch call without ForAll 
2. Can we do a bulk Upsert using Patch without ForAll?

 

Ref: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch#modify-or-crea...

 

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Patch multiple records in CDS with a single call

Hi @puluthra 

Check out @mdevaney blog and see if his solution works for you https://matthewdevaney.com/patch-multiple-records-in-power-apps-10x-faster/ 

Highlighted
Microsoft
Microsoft

Re: Patch multiple records in CDS with a single call

@Drrickryp  Thanks for sharing this, while this syntax Patch(Source, ShowColumns(ID, Col)) doesn't give any errors, I'm still seeing individual PATCH calls being sent in fiddler for each item in the collection:

puluthra_0-1596910689200.png

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,223)