Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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

 

  • leemagoo Profile Picture
    33 on at
    Re: Filter Array comparing two SharePoint Lists not working

    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. 

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Filter Array comparing two SharePoint Lists not working

    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. 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow