web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Function Patch has inv...
Power Apps
Unanswered

Function Patch has invalid arguments

(1) ShareShare
ReportReport
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 
 
 
Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at
    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
  • CU01102042-0 Profile Picture
    4 on at
    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
        }
    );

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard