Forum Discussion
John Twohig
Feb 08, 2018Iron Contributor
Sync SharePoint Online List to on-premise SQL Server
I would think it would be a common requirement to have lists in SharePoint contain consistent data with an on-premise source. A simple description of what I want to do is:
I have an employee tabl...
John Twohig
Apr 09, 2018Iron Contributor
Just in case anyone else needs to do this I was able to get it to work using flow. It turned out to be very easy only taking about 15 minutes to write the flow.
In my case what made it easy was I only have to update the list once at night and the lists are small enough ( About 1,000 list items) that I can delete all list items first and then add them again. That way I don't have to check to see which are new or which have changed.
There are only four steps:
- Get all existing items in the list
- Delete all the items from the list
- Get all the rows I want from the on-premise SQL Server. There was already an on-premise data gateway in place
- Create a new item in the list for each row retrieved
It should still be doable if you needed to update the list with changed or new items regularly during the day but would be much more complex and, in my case, not worth the effort.