Hi Team,
I have an SQL data source and a SharePoint list. The SQL list has columns PURCHID and DOCUMENTSTATE. The SharePoint List has columns PONumber and DocumentState. PURCHID and PONumber are unique keys.
I want to get the list of SQL rows (this is the up to date info), then get the list from the SharePoint . I then want to compare the value of DocumentState in the SharePoint list to the corresponding record from SQL, based on a match between the PURCHID and the PONumber in the two data sets. I would then update the SharePoint list to reflect the new values from SQL, but only for records changed. I have done this in an apply to each loop which is incredible inefficient so want to no avoid using this but I am having a lot of difficulty figuring it out.
SQL
PURCHID , DOCUMENTSTATE
PO12345, 10
PO23456, 20
PO34567, 30
SharePoint
PONumber, DocumentState
PO12345, 20
PO23456, 20
PO34567, 30
Resulting SharePoint update
Any help would be much appreciated.
Thanks in advance
Stu