cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rodrigosaraiva
Level: Powered On

Update a row in SQL Server fails, because the ID for update is sent with update fields request

First, it is some imcompreensible that Flow doens't have an update component allows to update a row with another fields beyond the id field. When we do complex logics with data, this is necessary.

Second, I am trying to update a row, after be obligated to go field by field, to check some condition, and when the condition is reached, and I call the update step, an error occurs because the request to update is sending the ID in the group fields that I want to update.

I think it is a component error, and nothing that could be fixed with alternate paths.

Screenshot from 2017-07-13 18-28-51.pngScreenshot from 2017-07-13 18-29-57.png

11 REPLIES 11
Community Support Team
Community Support Team

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Hi rodrigosaraiva,

 

What’s the trigger of your flow? How is the id field for action “SQL – Update row” configured?

 

To test this issue, I create a simple flow. The flow is triggered by “SharePoint – when a new item is created”, followed by the action “SQL – Update row”.


Then create a new item to trigger the flow, if the id is already existing in SQL table, it will run succeed.


Screenshots for the flow configuration and run details:

3.PNG

4.PNG

 

Please show me more details to reproduce this issue on my side.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rodrigosaraiva
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Thank for your repply.

 

but the problem is: I have a different structure from Sharepoint List and my database model, and this thing I can't change, because the database is receiving data from other diferent systems.

My trigger is an existing item is modified, then I get the item, I compose an external_id (it is how I need to control the integration between the list and database table, because the ID of a list cannot be the ID of table, and this is the reason that I complain because I cannot get a table row by another field different from table ID), then I get all the rows from table, and trying to identify the table row by a condition, to do an update. Everything is right, but when the update is sent to database server an error occurs because the ID field is sent to be updated to with the modified fields, and SQL Server don't allow update the ID field. I think the error is in this point.

 

Screenshot from 2017-07-14 10-42-21.pngScreenshot from 2017-07-14 10-52-28.png

Community Support Team
Community Support Team

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Hi rodrigosaraiva,

 

Thanks for clarification with more details.

 

As you mentioned, SQL Server don't allow update the ID field, so you will not be able to update the row with the modified ID field.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rodrigosaraiva
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

I think you do not understand the problem yet. I am not sending the Id field for update. I don't want modify the id field.

The component is doing that. That is the problem.

This update row component is sending the id for update, when is suposed to use the id only to identify the row.

 

thanks

 

jakekemme
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

I am having this same issue.  I'm attempting to update a row where the ID is an Identity Specification (numeric id auto incremented by the sql server).  The flow 'Update Row' action attempts to update this ID as well, which seems to be a bug as the selected row identity should never be updated.  As it stands, it seems impossible to update rows that have sql generated row identities as the primary key.

Anonymous
Not applicable

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

 
NieGreJoh
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Hi - I have also faced the same problem - trying to document how I compensated for that https://blog.hexatown.com/creating-sql-table-for-use-in-flow-and-powerapps-dd9e637caaf3

Anonymous
Not applicable

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Hi, I'm also hitting the same problem. The identity column should not be passed along to the update or it should include set identity on during update.

 

Anyone has the solution? Without the fix, the SQL update row totally cannot be used.

asdeev
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Is there a solution for this?

jarodts
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Ugh - no fun to find a problem with no solution...

jarodts
Level: Powered On

Re: Update a row in SQL Server fails, because the ID for update is sent with update fields request

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 75 members 3,429 guests
Recent signins:
Please welcome our newest community members: