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 Automate / Having issues with upd...
Power Automate
Unanswered

Having issues with updating a record from Dataverse Table to SQL Server "Primary key is compound by 0 elements but 1 were provided"

(0) ShareShare
ReportReport
Posted on by 97

I'm receiving an error when updating a record within my PowerApps application. I'm using a flow when a row is added, modified or deleted to update the SQL table with those changes. When updating a record, I'm receiving the following message.

 

"Primary key is compound by 0 elements but 1 were provided"

 

I've already confirmed that my primary key/column in SQL is "ID" as I have my Row ID for for the SQL update is set to the following function

 

"first(outputs('Get_rows_(V2)')?['body/value'])?['ID']"

 

I don't have any problems with adding a new record but when I'm updating a record I receive the error above. Can anyone help with updating my flow and or the function I'm using? I'm not sure what I'm needing to do to bypass this error so I can update the record. 

 

Cwilliams12_1-1716472345829.png

Cwilliams12_2-1716472394205.png

Cwilliams12_3-1716472441088.png

 

Cwilliams12_0-1716472281652.png

Categories:
I have the same question (0)
  • developermct Profile Picture
    37 on at

    Based on the error message "Primary key is compound by 0 elements but 1 were provided", it seems there is a mismatch between the primary key definition in the table and the data being inserted or updated. Here are a few possible causes and solutions:

     

    1. The table definition may have an empty or incorrectly defined primary key. Check the table schema to ensure the primary key is properly defined with the intended columns.
    2. The INSERT or UPDATE statement may be trying to provide a value for a primary key column that is actually an IDENTITY column or is automatically generated. In this case, you should omit that column from the INSERT statement or remove it from the UPDATE statement's SET clause.
    3. There could be a trigger or constraint that is interfering with the operation. Review any triggers or constraints on the table.

     

    I hope that helps! 😊👍


    Darren Neese, Power Apps MVP ➡️ Get access to my free Power Apps crash course here: https://go.superpowerlabs.co/superlanding


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up. 😊👍👍


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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard