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 / Patch multiple records
Power Apps
Answered

Patch multiple records

(0) ShareShare
ReportReport
Posted on by 10

Hey I know, there are already much thready who handle this, but I didn´t understand how I can patch multiple records in a sharepoint list.

 

ForAll(Filter(Collection;User().Email=person.Email);Patch(ThisRecord;{variable:true}))

But this do nothing if I put this on a button.. I have to use much more conditions, but want to try it first with a easier version. So in the sharepoint there are definetley records who match this condition, but nothng happens.

 

Idk. if this with "ThisRecord" is right, but I don´t understand how I could get a loop in the patch.

Know someone what I do wrong? 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @JanMarten ,

    Try

    ForAll(
     Filter(
     Collection;
     User().Email=person.Email
     ) As aPatch;
     Patch(
     YourSPListName;
     {ID:aPatch.ID};
     {variable:true}
     )
    )

     

    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.

    Visit my blog Practical Power Apps

  • JanMarten Profile Picture
    10 on at

    @WarrenBelz thank you for your answer.

    I tried it, but sadly I get the error that I can´t use the same datasource in the Patch-function as the one of the ForAll-funtion.


    EDIT:
    Got it working through creating a variable of the sharepoint fistly and then I put this variable/collection in the ForAll command, but idk if this is a clean method...
    Sry that I haven´t clariefied that, "YourSPListName" and "Collection" are the same. If I remove "YourSPListName", the error disappers, but if I try it, nothing happens.

  • Reinerknudsen87 Profile Picture
    59 on at

    @WarrenBelz - I love this solution after I fought for hours with that same issue. Would you mind quickly explaining what happens here. I get everything but the first pair of curly parentheses in the Patch. What does {ID: aPatch.ID} actually do? does that represent a record?

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Reinerknudsen87 ,

    You can call aPatch whatever you want - I just have a naming protocol. All the As Function does is disambiguate the fact that the key fields have the same name (you cannot put {ID:ID} as Power Apps will not know which one you are referring to).

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard