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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare SharePoint lis...
Power Automate
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?

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    12,203 Super User 2026 Season 1 on at

    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.

  • jsangerman Profile Picture
    52 on at

    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
    12,203 Super User 2026 Season 1 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard