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

How to update multiple records from a collection into one SharePoint list column

(0) ShareShare
ReportReport
Posted on by 4

I have multiple rows in a collection called outputTable. I need to update all rows from this collection into a SINGLE column in a SharePoint list called MyList. It seems to be updating only the last row. DataCardValue1 is the list's ID column. DataCardValue16 is the Response column (multi-line text) in the SharePoint list. Not sure what I am missing.

 

 

 

// Clear the table and the selected (chosen) rows
Clear(outputTable);

Collect(
 outputTable,
 Filter(
 Gallery2.AllItems,
 IsChosen
 )
);

// Loop thru the selected (chosen) rows, update the SharePoint list's response column with the file names
ForAll(
 outputTable,
 Patch(
 'MyList',
 LookUp(
 'MyList',
 ID = (Value(DataCardValue11.Text))
 ),
 {
 Response: DataCardValue16.HtmlText & "<br/>" & outputTable[@Name] & "<br/>"
 }
 )
)

 

 

 

 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @cgarude 

    Please consider changing your Formula to the following:

     

    Patch('MyList',
     ForAll(
     Filter(Gallery2.AllItems, IsChosen) As _item,
     {
     ID = Value(_item.DataCardValue11.Text),
     Response: _item.DataCardValue16.HtmlText & "<br/>" & _item.Name & "<br/>"
     }
     )
    )

     

    There is no need for the collection as your Gallery already is a collection/table and you can directly retrieve the values from it.  

     

    I hope this is helpful for you.

     

    EDIT: Left out a comma in the formula...it's corrected above.

  • C-Papa Profile Picture
    1,836 on at

    Hi, i think it's because DataCardValue11.Text is one value that doesn't change, it's only updating one record where the ID = DataCardValue11.Text im not sure what DataCardValue11.Text brings to the formula? can you not update all record that are in your collection regardless of DataCardValue11.Text?

     

    ForAll(outputTable,Patch('MyList',ID = ID,{Response: DataCardValue16.HtmlText & "<br/>" & outputTable[@Name] & "<br/>"}))

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard