Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Compare SharePoint list to array

(0) ShareShare
ReportReport
Posted on by 52

I'm building a list of people in an array, comparing it to an existing list of people in a SharePoint list, then adding any missing people to the SharePoint list and updating the list record for any people that are not in the new array.

 

So far, I have run through each item in the array and used Get Items with a query filter to find matches. Anything array items without a matching list record were added to the list. Easy.

jsangerman_0-1638483146654.png

However, I'm having a hard time finding the people in the SharePoinst list that are not in the array. I could easily do nested loops, but that's not very efficient. I've tried using Filter Array, but I must not have the proper syntax.

jsangerman_1-1638483216682.png

When I run that, the filtered array always comes back empty. Why is that?

  • Ellis Karim Profile Picture
    11,122 Super User 2025 Season 1 on at
    Re: Compare SharePoint list to array

    Hmmm. This reverse logic can make my head hurt this late in the day.

     

    Try this test:

    In this version the Get Items action does not contain a filter query:

    1. List of items where the ApproverName (or Title in your flow) are not found in the People array
    2. List of items where the ApproverName (or Title in your flow) are found in the People array

    2021-12-03_18-52-46.png

     

    2021-12-03_18-52-58.png

     

    If I have understood the question correctly, I hope this helps.


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • jsangerman Profile Picture
    52 on at
    Re: Compare SharePoint list to array

    Thanks, Ellis.

     

    That's actually exactly what I did in the first part. That tells me which items in my array don't have a match in the SharePoint list.

     

    I'm having trouble doing the reverse: Figuring out which items in my SharePoint list don't have a match in the array.

  • Ellis Karim Profile Picture
    11,122 Super User 2025 Season 1 on at
    Re: Compare SharePoint list to array

    If I have understood the issue correctly, your flow could be simplified as:

    2021-12-02_23-09-52.png

     

    The Get Items action should include a filter query. The Current item will refer to the current item of the array:

    2021-12-02_23-10-14.png

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1