Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Need Help! Filtering by multiple choice columns/dropdowns

(1) ShareShare
ReportReport
Posted on by 10
Hello!
 
I am trying to add a search feature that people can select one to multiple choices from dropdowns and then can search a Gallery (SP list) based on the choices they selected.
 
The dropdowns are all based on choice fields from multiple columns.
 
General design:
 
My current Items equation for my gallery starts with: Filter ('List Name', IsMatch('Column name', DropdownName.Selected || repeating....)
 
Official equation: 
Filter('Standard Hire_1', IsMatch('Location:', DropdownLocation.Selected) || IsMatch('Job Title:',DropdownJobTitle.Selected) || IsMatch('Status Filled:',DropdownRoleFilled.Selected) || IsMatch('Position Type:',DropdownPostionType.Selected)
 
It is riddled with error and I can't find documentation to fix it.
 
The goal too would only search a dropdown if a choice has been selected and ignore it if it has not been selected.
 
I would also like to incorporate a search button if possible but not necessary. The goal with the search button is to delay the filtering until they have selected their dropdowns and click 'Search'. 
 
 
 
 
How each dropdown is set up:
 
On a side note is there a way to have a dropdown default be blank? I have no default value in SharePoint and in Power Apps and it still shows the first choice.
 
I'd appreciate any advice! Thank you so much for taking the time to read this! :-)
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 144,858 on at
    Need Help! Filtering by multiple choice columns/dropdowns
    Answering the second question first, set the AllowEmptySelection of your Drop-down to true.
    On the first item, this is probably what you need - although you do not need the button to start - the list will populate once the user selects all items.
    Filter(
       'Standard Hire_1', 
       'Location:'.Value = DropdownLocation.Selected.Value || 
       'Job Title:'.Value = DropdownJobTitle.Selected.Value || 
       'Status Filled:'.Value = DropdownRoleFilled.Selected.Value || 
       'Position Type:'.Value = DropdownPostionType.Selected.Value
    )
    
    Also note that you are using Or() here, so the list will be anything that matches any selection. If you want to narrow down the list to match all selections, use And()  (&& instead of ||). There are further refinements that can be done allowing for non-selection of one or more of the choices.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard