web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Looking for way to imp...
Power Apps
Unanswered

Looking for way to improve patch performance

(0) ShareShare
ReportReport
Posted on by 277

I need to patch new items to dbo.ChecklistItems (a SQL table) from template (colTemplate). I create a ForAll loop to copy the data from template to a temporary collection "colPatch". Then patch my SQL table at once. Here is my code:

 

ForAll(colTemplate,
 If(IsBlank(LookUp('dbo.ChecklistItems',colTemplate[@ID]='dbo.ChecklistItems'[@TemplateID] && CertID=varCurrentTest.ID)),
 Collect(colPatch,
 {
 Title:DataCardValue2.Text,
 TemplateID:ThisRecord.ID,
 TestType:varTestID,
 CertID:varCurrentTest.ID
 });
));


Patch(
 'dbo.ChecklistItems',
 ForAll(
 Sequence(CountRows(colPatch)),
 Defaults('dbo.ChecklistItems')
 ),
 colPatch
);

Clear(colPatch);

 

 

It takes about 13second to patch 150 items. Is there any way to improve the performance?

Categories:
I have the same question (0)

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard