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

Help with patch

(0) ShareShare
ReportReport
Posted on by 421

Hi everyone.  I am trying to use patch to update our SPList.  The code below will simply add a record, not update an existing one.  I have a dropdown that populates the text input fields, than when I updated the text field I want to update the record. 

 

The formula I am using is

 

"Patch(
PMTGameDefects,
Defaults(PMTGameDefects),
{Title: ddDefectMaintGameName.Selected.Title,
Defect1: tiDefectMaint1.Text}
)"

It will not update a record, but it adds a new one.  In the past when I have used Patch, the text fields are inside of a gallery, but this time they are not, they are just textinput fields except the one dropdown.  

 

Thank you in advance!


Chris

Categories:
I have the same question (0)
  • Verified answer
    zmorek Profile Picture
    3,272 on at

    Defaults() is causing it to patch a new row. Instead of Defaults(PMTGameDefecets), you need to tell it what record to update. Something like LookUp(PMTGameDefects, ID = SomethingHere). 

  • Ashwin7104 Profile Picture
    671 on at
  • ckserra33 Profile Picture
    421 on at

    @Ashwin7104 @zmorek Thank you both very much!  This is what I finished with that works correctly.

     

    Patch(
    PMTGameDefects,
    LookUp(PMTGameDefects,Title = ddDefectMaintGameName.Selected.Title),
    {
    Defect1: tiDefectMaint1.Text}
    )

     

    Thank you!!

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard