web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / update multiple record...
Power Apps
Unanswered

update multiple records from a gallery to a SharePoint list

(0) ShareShare
ReportReport
Posted on by

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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard