cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

SharePoint ---->When an item is modified ---> Update row in SQL table

Hi,

I created this flow to insert rows into sql table automatically from SharePoint. Insert Row to Sql is working good whereas, the Update Row to Sql is not working as expected. If I add two rows in the sql and I edit one row in SharePoint, it updates both rows in Sql whith same data. Please if someone can explain how Update row to Sql should proper way should be done. Thanks.flow.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: SharePoint ---->When an item is modified ---> Update row in SQL table

This one is working fine. Thanks @ScottShearer flow1.jpg

 

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: SharePoint ---->When an item is modified ---> Update row in SQL table

@najruli :

 

The behavior that you describe is exactly what I would expect based on the screen shots that you have supplied.  Every row returned from the Get rows action is being looped through and updated.  It sounds as though you want an additional condition before the Update Row or you need to filter the rows returned by Get Rows differently.

 

Scott

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

Scott
Highlighted
Frequent Visitor

Re: SharePoint ---->When an item is modified ---> Update row in SQL table

@ScottShearer ,

Thanks for your respond, is there a way if you can capture and image how would you have done it. 

 

Again here is how my flow works now. Lets say I add two rows to SharePoint and automatically they get inserted in SQL with no issue. When I modify one of the rows in SharePoint, it updates my both rows in SQL all the SAME... 

 

Thanks 

Highlighted
Super User III
Super User III

Re: SharePoint ---->When an item is modified ---> Update row in SQL table

@najruli :

 

I believe that the issue is with your Get Rows action.  Can you share how you are filtering the rows that you get back?  Are you only retrieving the row that is realted to the SharePoint entry that has been updated? 

 

Why are you using a Get Rows action before you know if the entry is a new entry or one that is being updated?

 

Scott

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

Scott
Highlighted
Frequent Visitor

Re: SharePoint ---->When an item is modified ---> Update row in SQL table

This one is working fine. Thanks @ScottShearer flow1.jpg

 

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (6,965)