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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Need Help with Filter Array

(0) ShareShare
ReportReport
Posted on by 10
I need help with my current filter array.
 
Currently I want to compare the email addresses in "Initialize Variable" and "Recipients Names - Selected" (from Excel) and return the email addresses of non-respondents only. But it is not filtering and returning all the list of email addresses in "Initialize Variable". 
 
I have the same question (0)
  • Mark Nanneman Profile Picture
    989 Super User 2025 Season 2 on at
    Need Help with Filter Array
    There are a few things wrong with your filter.  

    In the "From" parameter you need to input the array you want to remove items from. 

    I'm not 100% sure, but I suspect you want to have your "Recipents Names - Email Selected" output placed there.  It looks like you have it in the first parameter of your "Filter Query" instead.  In any case, you don't want to have the same array in the From and in one of the filter query parameters.



    For your filter query, you don't want to compare two arrays with a "contains" or "does not contain" operation.  You would instead do something like 

    <array variable> does not contain <item()?['email address']>

    To give you more specific fixes I'd have to see how you have your Select action set up.  Is there mapping involved, or is it just outputting a simple array of email addresses?
  • Newmember123 Profile Picture
    10 on at
    Need Help with Filter Array
    Hi @Mark Nanneman thanks for clarifying.
     
    Yes, the output is just an array of email addresses
  • Mark Nanneman Profile Picture
    989 Super User 2025 Season 2 on at
    Need Help with Filter Array
    Ok,  I'd recommend trying something like this--assuming the output of your select is a simple array
    e.g. ["email1@gmail.com","email2@outlook.com"...]

    If there are properties, then you need to make sure to reference the property name in your filter query.
    e.g.
    [{"email": "email1@gmail.com},{"email": "email2@outlook.com"}...]


    Here i'm filtering a simple array of integers in string format:
     
    the output of a select goes in the "From", this is the array I want to filter.  In this case it's just the number 0 through 9 in string format.  The filter is set up to remove any items in this input array that are also in the variable array:





    the variable is used to determine which items to filter out of the array output by "Select"
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard