web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare 2 Sharepoint L...
Power Automate
Unanswered

Compare 2 Sharepoint Lists (with a reference column) and then update records & create item if it doesnt exist

(0) ShareShare
ReportReport
Posted on by 32

Hi all, I've been scratching my head on this for a while, I've only made it work in the very slow inefficient way with 10000+ API calls and 1-4hr Flow run times.

 

I have 2 Sharepoint lists.

 

List 'A' is a live list that is in constant use and is for capturing data inputs. It has a UniqueID calculated column in the format of MM/dd/yyyy&OrderNumber. i.e: 04/30/20232056

 

List 'B' is a source list that gets updated weekly with true data. It has the same UniqueID calculated column with the format of MM/dd/yyyy&OrderNumber. i.e: 04/30/20232056

 

I now need to match items in the lists on this 'UniqueID' value, and then update List 'A' with extra data from List 'B'. The data in question that needs updating is timestamp data such as order placed, order fulfilled etc etc. Plus I need to do these features:

  • If an Item is found in 'A' and not 'B', it needs deleting
  • If an Item is found in 'B' and not 'A', it needs a record creating in List 'A'

I don't know the best way of doing this, but I know looping through nested For Each loops is not the best way to do it.


Any help would be great!

Categories:
I have the same question (0)
  • OJBridger Profile Picture
    32 on at

    Bumping post:

     

    I think I know the steps in theory:

    1. Get Items List A
    2. Get Items List B
    3. Put both into filtered Arrays
    4. Combine Arrays into a single Array based on uniqueID
    5. Loop over combined Array to Update Item in list A
    6. If item in exists in B but not A, create item in list A
    7. Lastly, delete any items from A that are not in B (no UniqueID match)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard