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 / update multiple record...
Power Apps
Answered

update multiple records from a gallery to a SharePoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone,

I currently have a Sharepoint list titled "test" that is connected as the datasource for a gallery in my PowerApp. Within my gallery, I have the name on the left, with an empty text_input (titled reason) next to it that it empty for all the records (this corresponds with a column titled reason in the SharePoint). I want to the user to be able to go in and change the reason for any/all of these gallery items, and have a button patch over this column to update the records. So in short, is there any way for me to update a single column of these selected records?

 

The code I am currently using is:

Patch('test', Gallery2.Selected,{Reason:Reasoning.Text})

 

This issue with this is that it is only updating the selected value in the gallery, but I am not able to have all values in the Gallery update simultaneously. Any help would be very beneficial. 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That being said, I am able to have a button in every record for the gallery, but I would like the user to have a single button to select, which can update all of the records at once. 

     

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Do you want to update all items in the gallery to its data source?

     

    If you do, you could use the ForAll and Patch functions, but for the reason that it is necessary to find the proper record to update you will need to add a Lable in the gallery items to hold the ID of the record. Below is a demonstration:

     

    8.png

    patch_all.gif

    9.png

    And the formula is:

    ForAll(Gallery.AllItems,Patch(DataSource,LookUp(DataSource,ID = Value(IDLabel.Text)), {Reason:ReasonInput.Text}))

     You could set the Visible of IDLabel to false to hide them in the gallery.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • lai_lai Profile Picture
    41 on at

    Cool! This article is helping me thinking about other situation:

     

    I've 2 different data bases, and want to copy some data from the excel data base to a Sharepoint list.

    In bouth sheets I have the record about a same grup of people, but in excel sheet I've a few more colunms.

     

    I want to copy the data from this colums to the Sharepoint, comparing the people with an ID.

    Looking your code, I though something like this:

     

     

    ForAll(Gal_Excel.AllItems;
     Patch(
     ShareopointList;
     LookUp(
     SharepointList;ID = Value(LabelWithIDinGal_Excel.Text)
     ); 
     {
     ColumA:LabelFromGal_ExcelColumA.Text 
     } 
     )
    )

     

     

     But is not working and doesn't present any error..

     

    I'm also worried about the different types of colums. In this case I'm using a Text Type, but I will use other types too.. Can you help me too, please?

     

    I want to do this:

     

    b5dfbcd1-de86-451a-a839-71a420955cba.png

     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard