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 / Using user input in fi...
Power Automate
Suggested Answer

Using user input in filter queries to Get items

(1) ShareShare
ReportReport
Posted on by 9
Hello,
 
I am very new to Power Automate and I have no programming background, so please be patient with my question.
 
I have a SP list of staff where one of the columns is Role (multiple options/text) and another is Status (Active or Inactive options/text). I want to create a flow that opens a draft e-mail and the recipients are based on Status and Role.
 
So, I want to Get Items from a SP list and I want to filter those for Status = Active (I can do this) and Role = User input (this is the problem).
 
This is my user input (these are also the options available under Role):
 
This is the Get items action:
 
How do I create syntax to get only the items that have a Role value equal to at least one of the options coming in from User input?
 
I don't have a problem afterwards, creating a string of e-mails, etc, and adding that dynamic content to the e-mail recipients field. It's just the filtering based on user input. Maybe I'm not selecting the right type of user input?
 
I have searched YouTube but haven't found a specific tutorial for this yet.
 
Thank you,
Joana
Categories:
I have the same question (0)
  • Sam_Fawzi Profile Picture
    879 Super User 2026 Season 1 on at
     
    To help you more accurately with the Power Automate flow, could you please confirm the following:
    • What type of column is “Role” in your SharePoint list?
    Is it a single line of text, a choice (single selection), or a choice (multi-select) field?
     
    • Is the Role input in the form (Power Automate trigger) a single-choice selection or a multi-select dropdown?
    If it’s a multi-select, are users allowed to choose more than one role at a time?
    These details will help ensure the filtering logic works correctly in your flow.
  • JJ-05061701-0 Profile Picture
    9 on at
    Answering your questions:
     
    • What type of column is “Role” in your SharePoint list? - This is choice (multi-selection allowed). Snip from SP list column:
     
     
    • Is the Role input in the form (Power Automate trigger) a single-choice selection or a multi-select dropdown? - It's multi-selection and users are allowed to choose more than one role. See snip of interface when I run the flow:
     
     
     
     
  • Suggested answer
    PJ-31031958-0 Profile Picture
    10 on at
    Hello,
    I am assuming your question in two different ways.
    1) you want to create flow where record will be processed when role from list is present and record status is active, but condition will be added with 'OR' for Role.
    Solution:
     
    2) you want to add role in dynamic way:
    Solution:
    Please Accept the solution if you are searching for this only. else please let me know if you need to know something else.
     
     
  • Suggested answer
    Sam_Fawzi Profile Picture
    879 Super User 2026 Season 1 on at
     
    We can use the intersection() function to compare the selected roles from the form with the roles in the SharePoint list. Here's a helpful reference for how the function works:  https://community.dynamics.com/blogs/post/?postid=b42cc511-dbcf-42cf-99fe-16084cea1cac
     
    In the Get items step, filter by Status = Active. Then, use a Filter array action to match items where the roles intersect with the user-selected roles.
     
    • In your Filter array step:
      • From: value (output of Get items)
      • Switch to Advanced Mode
      • Use this expression:
    length(    intersection(        item()?['Role'],        triggerBody()?['RolesInput']    )) > 0
     
    What this does: item()?['Role'] — gets the array of roles from the current SharePoint item
    triggerBody()?['RolesInput'] — the array of roles selected by the user
    intersection(...) — returns the common roles
    length(...) > 0 — checks if at least one role matches
    If there’s at least one match, the item passes the filter.
     
    and then you can use the output of the filtered array and provide the needed report format
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard