Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Function Patch has invalid arguments

Like (1) ShareShare
ReportReport
Posted on 1 Oct 2024 20:47:32 by 4
Hello Teammates,
I have put in all my todays effort to figure out this error. I have sql server database and table name powerbicomments. I am trying to insert a new record to the table . Please see below screenshot 
 
I checked the database and the datatype is matching as well. I am not sure what is wrong with it and would need some expert recommendation to resolve it.
Thank you guys in advance for helping me with this 
 
 
  • CU01102042-0 Profile Picture
    CU01102042-0 4 on 02 Oct 2024 at 02:42:52
    Function Patch has invalid arguments
    I added the code . This is my code still the same error 
    // Store data in the context variable
    UpdateContext({
        submittedData: {
            ClinicId: Value(TextInput3.Text),
            ClinicName: TextInput2.Text,
            Comments: TextInput1.Text,
            CreatedOn: DatePicker3.SelectedDate
        }
    });
     
    // Insert the data into the PowerBIComments data source
    Patch(
        PowerBIComments,
        Defaults(PowerBIComments),  // Use Defaults to create a new record
        {
            ClinicId: submittedData.ClinicId,
            ClinicName: submittedData.ClinicName,
            Comments: submittedData.Comments,
            CreatedOn: submittedData.CreatedOn
        }
    );
  • EddieE Profile Picture
    EddieE 4,643 on 01 Oct 2024 at 23:59:46
    Function Patch has invalid arguments
    It's possible you need to add 'Required' / Not-NULL fields into your Patch record. All Not-NULL fields need to be included, except for any fields auto generated by SQL, such as Timestamp and Auto-increment fields like Primary Key fields, etc

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,316

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,290

Leaderboard
Loading started
Loading complete