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
Unanswered

Patch Issue

(0) ShareShare
ReportReport
Posted on by 353

Hello all,

 

I have a Patch function that updates/Inserts into a SQL table, sometimes when i trigger the patch it goes through with no issues but nothing update in my table, i will click it again and then it updates. Is there an extra check i can do for the patch to make sure it works the first time ? 

 

Thanks 

Categories:
  • eka24 Profile Picture
    20,925 on at
    show your formula
  • mmattar Profile Picture
    353 on at

    Its just a normal patch function, 

     

    Patch(
    '[dbo].table_name',
    {
    column1: Value,
    column2: Value,
    column3: Value,
    column4: Value,
    column5: Value,
    column6: Value,
    column7: Value,
    column8: Value,,
    column9: Value,
    column10: Value,
    column11: Value,
    column12: Value,
    column13: Value,
    column14: Value,
    column15 :Value,
    column16: Value,
    column17: Value
    }
    );

  • eka24 Profile Picture
    20,925 on at
    Patch( Customers, Defaults( Customer ), { Name: “Contoso” } )
    For adding new record. You left the defaults
  • mdevaney Profile Picture
    29,993 Moderator on at

    @mmattar 

    Here's my idea.  I can't think of a way to make it less effort but the code should work.

    // patch the record and store the result in a varaible
    Set(myPatchedRecord,
     Patch('[dbo].table_name',
     LookUp('[dbo].table_name', ID = some_number),
     {
     column1: Value,
     column2: Value,
     column3: Value
     }
     )
    )
    
    // check if the patched record matches input values
    Set(wasPatchSuccessful,
     myPatchedRecord.column1 = Value
     And myPatchedRecord.column2 = Value
     And myPatchedRecord.column3 = Value
    )
     
    // display notifcation if patch was not successful
    If(wasPatchSuccessful,
     Notify("Patch did not update all values in SharePoint", NotificationType.Error)
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard