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 / Filter Array comparing...
Power Automate
Unanswered

Filter Array comparing two SharePoint Lists not working

(0) ShareShare
ReportReport
Posted on by 33

I've looked for the answer across this forum but can't see one for this specific issue.  I've attached photos to explain my flow and where it's going wrong, but in summary this is what I want to do.

 

Compare two SharePoint Lists, List A and List B - both lists have a column A which has a unique reference number (eg. VPT12345678).   List A is a feed of records, however some of those records will already be on List B, so I only want the new records.  So, what I am aiming to do, is compare List A and List B via column A (both are title columns and are single line of text), ignore where they match and add in new records where they don't match. I am trying to achieve this via the Filter Array that also uses the condition of length(body('Filter_array')) equals 0, to identify the records that don't match.  In this case to test it, I have 12 records on List A, 1 of those is new and 11 are already on List B, so I should in theory only have  1 new record added to List B. However, it is adding all 12 records to List B resulting in 11 duplicates.  It looks to me like the array to find a match is not working, but I don't know why?

 

I'd appreciate someone looking at this for me and giving me some steer, because I am new to this. But really want to learn.

leemagoo_1-1680773175256.png

 

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    How did you end up with the second Apply to each where it is creating an item?

     

    Apply to each 1 should be using the values of List A. For each row in List A it is going to Filter Array the List B Get Items and see if the value is in there using the condition. If the condition shows there is zero 0 length, then it is Yes; therefore create a new item on List B using the current value from Apply to Each 1 from List A.

     

    I don't see why an Apply to Each 2 would be in the create item. It should just be using the current single item from Apply to Each 1 from List A.

     

    That is probably the error. Without seeing exactly the value source of the Apply to Each, I can't confirm what exactly it is doing, but try to remove that and see if it works.

     

    I'm guessing you inserted the Create Item step, and then you accidently put in a value from the Get Items 2, and it automatically made it Apply to Each 2. 

  • leemagoo Profile Picture
    33 on at

    Good spot, I do remember selecting the wrong one and taking it out and correcting it, but the damage may have been done. I will go check and if this is the fix I will mark as solved!  Thanks for getting back so quickly. 

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