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 Automate / When an existing list ...
Power Automate
Unanswered

When an existing list item is modified, update a SQL row

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am new to Microsoft Flow and using the following template referenced in my subject line "When an existing list item is modified, update a SQL row ". 

 

I'm able to connect to my SharePoint List as well as to my SQL Table on the server, I'm testing the sync and trying to update the record in the table but keep getting the below error. I have two primary keys on my sql table which are "LoanNumber" and "Underwriter". I've looked online and cannot find how to solve for this, I am using "LoanNumber" as my ROWID required column on the SQL Update Row action.

 

 

{
  "status": 400,
  "message": "2 keys were specified, but 1 values were provided.\r\n     inner exception: 2 keys were specified, but 1 values were provided.\r\nclientRequestId: c5ed77df-1d1a-47c0-a0e9-cbfabe970bb4",
  "source": "sql-wus.azconn-wus.p.azurewebsites.net"
}

 

 

Any help in the right direction is greatly appreciated.

 

Thank you

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I messed around with this some more and if I dropped the "Underwriter" primary key from my SQL table and just had the "LoanNumber" primary key then my flow worked correctly. The problem however is that the user could enter the same loannumber twice into the SP List so I can use LoanNumber only as primary key. There is an ID column which appears to be an identity column and is unique. My question now is should I change the primary key to be this ID column and map that or is there a way for me to have two or more identity columns and get the flow to recongize both in the singular ROW ID column in my flow?

  • crisby Profile Picture
    31 on at

    Hi guys,

     

    I have the same issue here.....I have a table with two keys but I am only able to provide one of the keys in flow via the "Row id" field.....any chance the update sql action can accept multiple key fields?

     

    Thanks

  • rox159357 Profile Picture
    2 on at

    same here can some one help point the way to use combined primary key as Row ID?

  • kigenst Profile Picture
    2 on at

    Same issue. Has anyone found a solution?

  • DTreg85 Profile Picture
    111 on at

    Hello @kigenst 

     

    My solution was to create a stored procedure that executes a sql statement. Then I just pass the update statement from the app to the stored procedure which will run it. Takes a little bit to get it set up and isn't perfect but it works well once it's up and running. Hope this helps.

  • zdenko_zahorec Profile Picture
    29 on at

    Hi there,
    Try to separate primary key values by comma.


    Capture.PNG

     I have table with three keys and it works fine when tested. 
    Capture.PNG

     
    Hope it help.
    ZZ

     



  • DTreg85 Profile Picture
    111 on at

    @zdenko_zahorec ,

    Wow that's cool, I'll definitely give that a try!

     

    Thank you!

  • victoraguiar Profile Picture
    43 on at

    I had the same issue and it worked for me. Thank you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard