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 / ForAll Patch Update on...
Power Apps
Answered

ForAll Patch Update only First record

(0) ShareShare
ReportReport
Posted on by 4

Hi. I am trying to update bulk record in SharePoint List with using below code

 

ClearCollect(Coll_loop_Mater_Table,Filter('Master Table',Title=btn_LOB_MS.Text && Product=btn_Product_MS.Text));
ForAll(Coll_loop_Mater_Table,
Patch('Master Table',LookUp('Master Table',Title=btn_LOB_MS.Text && Product=btn_Product_MS.Text),
{
'Team Manager':Combo_Manager.Selected.GivenName & " " & Combo_Manager.Selected.Surname
'Team Manager mail Id':Combo_Manager.Selected.Mail
}));

 

but it's update only first row in list. is that because using multiple conditions in lookup which patching record.

I can see all the record in collection but update only first row.

 

please help me to come out.

List.png
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,530 Most Valuable Professional on at

    Hi @sacpat ,

    I am assuming here you are updating all the matching records with the various fields selected in a Combo Box. I also have to assume that the user has selected one of these fields before the Patch (if not the other two will not be available)

    With(
     {
     wMaster:
     Filter(
     'Master Table',
     Title = btn_LOB_MS.Text && 
     Product=btn_Product_MS.Text
     )
     },
     Patch(
     'Master Table',
     ForAll(
     wMaster As aPatch,
     {
     ID: aPatch.ID,
     'Team Manager': Combo_Manager.Selected.GivenName & " " & Combo_Manager.Selected.Surname
     'Team Manager mail Id': Combo_Manager.Selected.Mail
     }
     )
     )
    )

     

    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

  • sacpat Profile Picture
    4 on at

    @WarrenBelz Thanks a lot. This is really help.

    I have been stuck for month.

     

    and thanks a lot to @RezaDorrani 

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard