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 / Patch to multiple records
Power Apps
Answered

Patch to multiple records

(0) ShareShare
ReportReport
Posted on by 94

Hi all,

 

I am trying to patch to all records where the name is "Ross" and the Week No. is that which the user has typed. I believe I need to use the "for all" function but I can't seem to make it work. Here is my working code which patches to a singular record but fails to patch to all records meeting the conditions:

 

If(
IsBlank(RossWeekInput.Text),
Notify("Please fill in a week number.", NotificationType.Error, 2000),
If(
IsBlank(
LookUp(
Times,
'Week No.' = Value(RossWeekInput.Text) && Name = "Ross"
)
),
Notify("Error. No records exist for that week.", NotificationType.Error, 2000),
Patch(
Times,
LookUp(
Times,
'Week No.' = Value(RossWeekInput.Text) && Name = "Ross"
),
{
'Pay Status': "PAID"
}
);
Notify("Record updated successfully.", NotificationType.Success, 2000)
)
);

Reset(Checkbox1)

 

Any help appreciated thanks!

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @R45 ,

    This may be a better approach

    If(
     IsBlank(RossWeekInput.Text),
     Notify(
     "Please fill in a week number.", 
     NotificationType.Error, 
     2000
     ),
     IsBlank(
     LookUp(
     Times,
     'Week No.' = Value(RossWeekInput.Text) && Name = "Ross"
     ).Name
     ),
     Notify(
     "Error. No records exist for that week.", 
     NotificationType.Error, 
     2000
     ),
     UpdateIf(
     Times,
     'Week No.' = Value(RossWeekInput.Text) && Name = "Ross",
     {'Pay Status': "PAID"}
     );
     Notify(
     "Record/s updated successfully.", 
     NotificationType.Success, 
     2000
     )
    );

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard