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 / Performance Issue with...
Power Apps
Unanswered

Performance Issue with Patch

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone,

I have created a inventory app on PowerApps. Part of this app has the ability to created different templates for different locations. Once a template is created I use the Patch command to generate a inventory for the user to completed his inventory. The following is that patch command:

 

 

ForAll(
 'Template Details',
 If(
 crdf5_TemplateNo.TemplateNo = TempNo,
 Patch(
 'Inventory Details',
 {
 crdf5_Category: crdf5_Category,
 crdf5_ItemNo: crdf5_ItemNo,
 crdf5_itemdescript: crdf5_itemdescription,
 crdf5_inventoryunits: crdf5_Units.'Unit Type Cal',
 crdf5_unitqty: crdf5_UnitQtyCal.'Unit Qty',
 crdf5_InReportNo: LookUp(
 'Inventory Reports',
 Text(InReportNo) = DataCardValue4.Text
 ),
 crdf5_purchasecost: crdf5_purchasecost
 }
 )
 )
)

 

 

 

Considering we are patching about 300 record this process can take a long time (3min). Can any of you see a way I can performance tune this, or suggest a different approach? 

 

Thanks

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @Anonymous ,

    I am not an SQL user and just wanted to confirm these are new records.

    If so, you can consider using the Collect command as this works in SharePoint

    The field names of the Collection would have to be the exactly the same as ones in the data source (some RenameColumns may be necessary) and the syntax for SharePoint is simply

    Collect(‘Inventory Details’,’Template Details’)

    This might be worth testing for speed if it works in SQL.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Warren,

    I did not think that your could "collect" from one CDS table to another. I will do some tests and let you know hat this works.

     

    Jason

  • WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Ok thanks,

    You are probably right with the tables - what about a collection to CDS?

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard