cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
najruli
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

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

 

View solution in original post

4 REPLIES 4
ScottShearer
Super User III
Super User III

@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

@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 

@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

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

 

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (39,352)