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 / Patching a collection
Power Apps
Answered

Patching a collection

(0) ShareShare
ReportReport
Posted on by 391

Hello! I am attempting to patch a collection. I am able to patch correctly, however it only submits one of the rows rather than all of the rows in the collection. I am unsure what I am doing wrong! Anyone have any helpful advice?

 

Patch Code

Patch('Material Requests', Defaults('Material Requests'),
{
 ItemDescription:Item_Description.Text,
 Quantity:Quantity.Text,
 PurchasedFrom:Purchased_From.Text,
 PartSerialNumber:'Part/Serial_Number'.Text,
 JobComplete:ti_Complete.Selected
}
)

The App

CodyO_0-1712935294352.png

The SP List

CodyO_1-1712935343785.png

 



Categories:
  • Verified answer
    LowCodeJim Profile Picture
    314 Moderator on at

    Hi @CodyO,

     

    It looks like you are adding all your items to a temporary collection below the form. You will need to wrap your patch statement in a ForAll to patch all the items:

    ForAll(
    <COLLECTIONNAME>,
    Patch('Material Requests', Defaults('Material Requests'),
    {
     ItemDescription:<ITEMDESCRIPTION>,
     Quantity:<QUANTITY>,
     PurchasedFrom:<PURCHASEDFROM>,
     PartSerialNumber:<PARTSERIALNUMBER>,
     JobComplete:<COMPLETE>
    }
    )
    )

     

    You will need to replace the placeholders with the name of the relevant column in your collection.

     

    Hope that helps!

     

    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.
  • CodyO Profile Picture
    391 on at

    That is working perfectly, Thank you @SharePointJB!!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard