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

power app

(1) ShareShare
ReportReport
Posted on by 11
Patch(
    Employees,
    Defaults(Employees),
    {
        EmployeeID: Value(TextInput1.Text),
        EmployeeName: TextInput2.Text,
        EmployeeNumber: TextInput3.Text,
        Comments: TextInput4.Text
    }
);
it show error like the function 'patch' has some invalid argument shows error
Screenshot (47).png
Categories:
I have the same question (0)
  • timl Profile Picture
    36,682 Super User 2026 Season 1 on at

    @kushalhedaoo07 

    This looks like valid syntax. Can you post the error that you're receiving?

    A couple of things I'd check is that EmployeeID is properly defined as a primary key field in SQL Server. The Patch operation will fail because of this. 
    I would also check that the value you enter in TextInput1 is a unique number, as a duplicate ID value would also cause an error.

  • kushalhedaoo07 Profile Picture
    11 on at

    Yes, I will ensure the EmployeeID is unique and all details are correctly filled. Despite this, the error persists with the message indicating an invalid argument for the 'Patch' function. SQl server permission is require?

  • developingteal Profile Picture
    392 on at

    make sure you have no triggers in sql server

  • developingteal Profile Picture
    392 on at

    @kushalhedaoo07 also expand the error message out by giving us the https error returned. Use IfError for this purpose, and it will give you and those helping you a lot more insight to the actual issue. 

     

    Patch functions don't have descriptive error messages, so we need to get the root error message to debug.

  • kushalhedaoo07 Profile Picture
    11 on at

    yes there is triggers in sql server then how to solve problem

     

  • developingteal Profile Picture
    392 on at

    @kushalhedaoo07  You have to remove them - Powerapps can not patch if they exist in sql server. Hopefully this does not make a difference for you

  • developingteal Profile Picture
    392 on at

    powerapps will handle things like assigning nulls to values and other similar simple functions triggers sometimes do, however if you are using your triggers for some larger function you are going to have to find another way besides using a trigger

  • kushalhedaoo07 Profile Picture
    11 on at

    ok i will try thanks for reply

  • developingteal Profile Picture
    392 on at

    No problem, mark as solution whatever the solution ends up being for you and kudos anything that was helpful!

  • developingteal Profile Picture
    392 on at
    What's the status of this/ what's the current error?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#2
Haque Profile Picture

Haque 69

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard