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 and return NEW for non-existed item

(0) ShareShare
ReportReport
Posted on by 2

Hi , 

 

Much appreciated for all the help!

 

So i have two SharePoint lists which have the same column (ID_A), i will have lists A will keep updating , and i am trying to find a way to display "new" in a different column where ID_A are inconsistent between the 2 lists.

List A.png

List B.png

I  try a lot method online, but doesnt seem to work, please can someone help provide some advise.

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,690 Moderator on at

    1) Get Items (filter query Compare eq 'null') -- that'll make it so you only retrieve things you haven't already flagged as new.

    2) Get Item, and put the ID from the output of Get Items into that. It'll turn into an Apply to Each.

    3) Condition: if (whatever field) does not equal (whatever other field), then "Yes" -- and put an "Update Item" in there with "New" in your Compare field. If "No", then do nothing.

     

     

    But I don't quite understand what you're comparing here. If ID A is what's changing, then you will need a key between the two SharePoint lists, something that is ALWAYS the same between the two of them, or there will be no way to compare. If ID A is that key, then my comments above will work. 

  • Wing2023 Profile Picture
    2 on at

    Hi Rguassuring,

     

    Thank you for the assistant, based on your flow, i have draft the following , but its unable to work. Can you advise.

    A.jpg

    B.jpg

  • grantjenkins Profile Picture
    11,063 Moderator on at

    This is how I'd go about build the flow.

     

    For this example, I have the following SharePoint Lists. Note that I've just used the Title column in place of your ID A column, but would be the same concept. We can see that A-005 and A-006 are new items.

    grantjenkins_10-1701777491625.png    grantjenkins_1-1701776637223.png

     

    See full flow below. I'll go into each of the actions.

    grantjenkins_2-1701776745242.png

     

    Get items List A retrieves all the items from List A. Note that by default Get items will only return the first 100 items, so if you have more than that you can set the Top Count to 5000 (max) to retrieve up to 5000 items.

    grantjenkins_3-1701776840874.png

     

    Select extracts out the values in our Title column. You would use your ID A column here.

    grantjenkins_4-1701776917684.png

     

    Get items List A Compare retrieves all the items from List A Compare.

    grantjenkins_5-1701776982254.png

     

    Filter array uses values and Title from Get items List A Compare, and the Output from the Select. This will filter out only the new items that we need to update. Note the condition here is does not contain. Again, you would use your ID A column in place of the Title column.

    grantjenkins_6-1701777064872.png

     

    Apply to each uses the output from the Filter array so it only iterates over the items that we need to update.

    grantjenkins_7-1701777127916.png

     

    Update item uses the following expression to get the ID of the current item in the Apply to each. It then sets the Compare Value to New.

    item()['ID']

    grantjenkins_8-1701777207312.png

     

    If we run the flow, the Apply to each should only iterate over the last two items that are missing and update them to New.

    grantjenkins_9-1701777312927.png

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard