Hello all. I would like to disclaim; I am limited in the information I can share due to its sensitivity.
Background:
The purpose of this flow is to take records from a daily generated excel report and see if those records exist in a Sharepoint list. If the record does not already exist, a new record is created. If the record does exist, the Sharepoint list record is updated using the info from the excel report.
Extracting and transforming the data from both sources, adding new records to the Sharepoint list, all no issue. The problem is updating records.
The process to match records between the two sources is as follows:
First, the records are loaded into individual select actions for final formatting. JSON Items comes from the excel sheet, Sharepoint items comes from the Sharepoint list.
Next, for each record in body(JSON_Items), this condition is evaluated:
If body(Sharepoint_Items) contains items('Apply_to_each')['ControlNo'] (the current ControlNo), update items, else create a new item. (the update action is not there yet, the array variables are there for further steps, please ignore)
Here is an example of a ControlNo/Account #: