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 / More info / example on...
Power Apps
Answered

More info / example on Patch bulk updates

(0) ShareShare
ReportReport
Posted on by 92

I am trying to use the patch function to update the whole recordset in a Gallery control that gets it's data from MySharepointList. The code is run from a button.onselect and shows no errors but the dataset is not updated.

ClearCollect(MyCollection, Gallery.AllItems);
Patch(MySharePointList, MyCollection)
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    ClearCollect(MyOriginals, {query used to create the gallery});
    ClearCollect(MyCollection, Gallery.AllItems);
    Patch(MySharePointList, MyOriginals, MyCollection)

    This may work for you.

  • Verified answer
    hpkeong Profile Picture
    2,944 on at

    Hi @StevenMoore

     

    In fact, I have posted on Patch before and recently, again, to look for shortcut to Patch in Batch. You can search my solution under hpkeong.

     

    Anyway, I share again the method which 100% work but I don;t like due to extra work.

    e.g.:

    ForAll(Gallery1_1.AllItems, Patch(DS1, Defaults(DS1), {FiedTitle1: Label1.Text, FieldTitle2: Label2Text, FieldTitle3: Label3.Text}))

    where, 

    FiedTitle1: Label1.Text  ... means you must have inserted Label1, Label2, ...into the gallery.

    and make the Gallery Invisible (as I don;t want view because I use for Batch Patch only).

     

    Note:

    If you are using Collect to collect all InputText into a collection, after several input,

    you can use Patch(DS, CollectionTable) easily.

    I am still finding out the main reason why both has different results with Michael.

     

    Please use the first method to get it done and once I get the second one done, i will share again.

     

    Hope this helps.

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
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard