Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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
  • developingteal Profile Picture
    392 on at
    power app
    What's the status of this/ what's the current error?
  • developingteal Profile Picture
    392 on at
    Re: power app

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

  • kushalhedaoo07 Profile Picture
    11 on at
    Re: power app

    ok i will try thanks for reply

  • developingteal Profile Picture
    392 on at
    Re: power app

    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

  • developingteal Profile Picture
    392 on at
    Re: power app

    @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

  • kushalhedaoo07 Profile Picture
    11 on at
    Re: power app

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

     

  • developingteal Profile Picture
    392 on at
    Re: power app

    @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.

  • developingteal Profile Picture
    392 on at
    Re: power app

    make sure you have no triggers in sql server

  • kushalhedaoo07 Profile Picture
    11 on at
    Re: power app

    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?

  • timl Profile Picture
    34,933 Super User 2025 Season 1 on at
    Re: power app

    @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.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard