Skip to main content

Notifications

Power Platform Community / Forums / Building Power Apps / Function Patch has inv...
Building Power Apps
Unanswered

Function Patch has invalid arguments

Posted on 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 at
    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 at
    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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,157

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard