You on the right path if I get what you trying to achieve is to compare the two dataset and update SharePoint with the added data in Excel. If this is the case this is how you can achieve it with a loop to apply the changes only (you don't have an issue with this so I won't to venture into it).
Steps:
- Get the data from SharePoint as the data to compare with.
- Get the data from Excel as the data which will be compared
- Filter the Excel Data by Data already in SharePoint
- Loop there the data in step three to update SharePoint
Let's start with the result
This is an illustration to do this whereby i will use two array variables which in essence be the SharePoint (varSpoList) and Excel Data (varExcelData)
Figure: the variable being initialized in these steps in the flow
varSpoList
varExcelData
Now that we have the data we need to compare or filter them.
First lets select the data in varSpoList by adding a Data operation Select
Switch to advance mode in Map and add your column you wish evaluate here, im going to evaluate item so it will be item()?['item']
Now we have the SharePoint data, all that left is to compare or filter the Excel Data
Add a data operation Filter and from the Excel Data (your file) evaluate the output of the SharePoint Selected Data Output
So what does it look like when its all put together.
"Sharepoint" have the items 1,2
"Excel" have the items 1,2,3,4,5,6 - the user added the data 3,4,5,6 and that what we want to write to excel
We expect the filter to give us an array with the data 3-6.