Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Double filter on job title

(0) ShareShare
ReportReport
Posted on by 1,597 Super User 2024 Season 1

Hello,

 

I am trying to filter out list items where the 'Position' field contains the words "Executive Director of" but not to return results for where the position is "PA to Executive Director of".

 

For example we have different Executive Director job titles eg "Executive Director of Operations" however their PA will also have the job title of "PA to Executive Director of Operations".

 

We want to only bring back a list of each Executive Director so that we can send them an email later in the flow. 

 

I have tried adding a Condition with Position contains Executvive Director of

and then another row where Position does not contain PA to Executive Director of

 

However this is not returning the expected results.

 

sudosaurus_0-1679403027288.png

 

  • grantjenkins Profile Picture
    11,059 Super User 2025 Season 1 on at
    Re: Double filter on job title

    I believe you've got your Condition setup incorrectly.

     

    Assuming you want the below conditions, which is what you have within your Parallel branch (why it works there).

     

    Position contains "Chief Executive"

    OR

    Position contains "Executive Director of" AND Position does not contain "PA to Executive Director of"

     

    Then you would have the following.

    grantjenkins_0-1679489996050.png

     

    However, I'd definitely do this within a Filter array so you're not applying this filter 2104 times within your loop.

     

    @Anonymous(
     contains(item()?['Position'], 'Chief Executive'),
     and(
     contains(item()?['Position'], 'Executive Directory of'),
     not(contains(item()?['Position'], 'PA to Executive Director of'))
     )
    )

     

    grantjenkins_1-1679490331095.png

     

    You could then take the output from the Filter array to create the schema in a Parse JSON and loop through the results (without the need for a condition in the loop).

  • abm abm Profile Picture
    32,488 Most Valuable Professional on at
    Re: Double filter on job title

    Hi @sudosaurus 

     

    Thanks for your reply. Not sure what's going on here. When you set to parallel it did worked. I did tested this but not with 2104 records 🙂 

     

    Could you try to do Filter action step instead of the IF. Try filtering one at a time then do anther filter and see if that works or not? Just want to evaluate why the IF contains and not contains didn't worked.

     

    Thanks

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Double filter on job title

    @abm 

    It's getting back the correct amount of items.

    This is a total of the amount of items in the SharePoint list:

    sudosaurus_0-1679487043714.png

     

    So I refer back to my questions above?

  • abm abm Profile Picture
    32,488 Most Valuable Professional on at
    Re: Double filter on job title

    Hi @sudosaurus 

     

    Have a look on this solution. Think you have more than 5000 records.

     

    Super Simple flow to get more than 5000 SharePoint Items (tachytelic.net)

     

    Let me know how it goes.

     

    Thanks

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Double filter on job title

    @abm I have set pagination to 3000 - it looked through 2104 items in the SharePoint list.

     

    As above, I get the required data when using the Parallel branch method, but ideally want each of the conditions to be processed in one singular branch.

  • abm abm Profile Picture
    32,488 Most Valuable Professional on at
    Re: Double filter on job title

    I asked earlier question that what's your total number of records here? I am trying to find out you might have a threshold limit here hence it won't pick up unless you use pagination.

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Double filter on job title

    @abm 

    What am I doing wrong here that no results are displayed?

    sudosaurus_0-1679417742182.png

     

    This works if I use a parallel branch however:

    sudosaurus_1-1679417778624.png

     

     

  • abm abm Profile Picture
    32,488 Most Valuable Professional on at
    Re: Double filter on job title

    Hi @sudosaurus 

     

    Believe the record is stored as 'Executive Director of'. It's case sensitive. Also whats the total number of records in your List?

     

    Thanks

  • sudosaurus Profile Picture
    1,597 Super User 2024 Season 1 on at
    Re: Double filter on job title

    @abm 

     

    How can I see an immediate output of the items that returns the values I want to see? Rather than clicking through each of the 2104 items retreived?

     

    sudosaurus_0-1679408181529.png

     

     

     

  • abm abm Profile Picture
    32,488 Most Valuable Professional on at
    Re: Double filter on job title

    I have tested this and it should work. Remember the checks in PowerAutomate are case sensitive.

     

    Thanks

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492