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 Platform Community / Forums / Power Apps / Patch function in powe...
Power Apps
Suggested Answer

Patch function in power apps - error [patch has some invalid argument]

(0) ShareShare
ReportReport
Posted on by
Hey,
I am facing a issue with a patch function mentioned below

Refresh('ha.ProjectReview');
 
Patch('ha.ProjectReview',
LookUp('ha.ProjectReview', client_code = ThisItem.Client_Code && project_code = ThisItem.Project_Code),
{client_code:ThisItem.Client_Code, client:ThisItem.Client, project_code:ThisItem.Project_Code, project:ThisItem.Project, ToBeReviewed: 1, isScheduled:0, isReviewCompleted:0});
 
 

Details on the bug:


I am encountering an error in my Patch function, stating that there are invalid arguments when trying to use the table (as shown in the attached image). Here are the potential solutions I have tried:

  1. The code works in the production environment with a different SQL Server connection, but it does not work in the development environment. I have verified that there is no connection issue there.
  2. The table is utilized in Power Automate, and the flow successfully fetches rows, confirming that the connection is functional.
  3. I created a new connection and tested it, but the same error persists.
  4. It was previously working without issues, but this error has suddenly appeared.
**ha.ProjectReview - is a table 

Can anyone find a solution to this issue?

I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
     
    Do you have a Primary key in your SQL Table. Is error usually occurs when that's missing. I'd suggest adding that as that might take the error away. 
     
    Hope this helps.
     
    Kind regards, 
    Nandit

    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard