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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Double filter on job t...
Power Automate
Unanswered

Double filter on job title

(0) ShareShare
ReportReport
Posted on by 1,599 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

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

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

     

    Thanks

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @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,865 Most Valuable Professional on at

    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,599 Super User 2024 Season 1 on at

    @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,865 Most Valuable Professional on at

    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,599 Super User 2024 Season 1 on at

    @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,865 Most Valuable Professional on at

    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,599 Super User 2024 Season 1 on at

    @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,865 Most Valuable Professional on at

    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

  • grantjenkins Profile Picture
    11,063 Moderator on at

    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).

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard