cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CarlHRVA
Level: Powered On

Help with filtering gallery on multiple dropdowns

I know this has been asked in many different ways before but I can't seem to get it to work properly and any help would be greatly appreciated. I have a gallery with a list of collection efforts and I would like to be able to filter those results based on one of three drop downs, Customer Name, Hotel Name and Collector.  I am close but it seems that only the Collector drop down filters the results reliably where the other filters show items that don't match or doesn't change the results at all.

 

The formula I currenly have in place is:

 

SortByColumns(Filter('Collections DB','Customer Name' = Dropdown4.Selected.Result || 'Hotel Name' = drpdwnHotelName.Selected.Result || 'Collector' = Dropdown6.Selected.Result),"Customer_x0020_Name",Ascending)

 

Thank you for any and all help!

 

Thanks,

Carl

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Help with filtering gallery on multiple dropdowns

So it sounds like you don't want to apply all three conditione at once. You just want to apply one drop down selection at a time. Try this formula (hopefully there aren't too many typos):

 

If(!IsBlank(Dropdown4.Selected.Result), Filter('Collections DB','Customer Name' = Dropdown4.Selected.Result),
If(!IsBlank(drpdwnHotelName.Selected.Result), Filter('Collections DB', 'Hotel Name' = drpdwnHotelName.Selected.Result),
If(!IsBlank(Dropdown6.Selected.Result), Filter('Collections DB', 'Collector' = Dropdown6.Selected.Result),
'Collections DB')))

 This formula assumes only one drop down will have a selected value and that is the value you want to filter on.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
8 REPLIES 8
Super User
Super User

Re: Help with filtering gallery on multiple dropdowns

The formula looks good. Since you are using an "or" operator it is very possible that you select something in one drop down and nothing changes because the record being returned only needs to meet one of those "or" conditions.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
CarlHRVA
Level: Powered On

Re: Help with filtering gallery on multiple dropdowns

Unfortunately it's not filtering on items I know that it should. Any value that appears in the dropdowns also appears in the data source naturally but the filter is not being applied or if it is it's not correct. For instance, I know there are 5 items with a Customer Name of "Air Country" and when I filter based on Customer name it returns those 5 items first as well as many others that don't have the same customer name after them.

 

Thanks,

Carl

Super User
Super User

Re: Help with filtering gallery on multiple dropdowns

When  you have Customer Name of "Air Country" selected in one drop box what is selected in the other two drop boxes?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
CarlHRVA
Level: Powered On

Re: Help with filtering gallery on multiple dropdowns

Each dropdown resets the other two OnChange using the below formula w/ the appropriate dropdowns for each. I also have AllowEmptySelection changed to True with no default value so they reset to blank.

 

Reset(Dropdown4); Reset(Dropdown6)

Super User
Super User

Re: Help with filtering gallery on multiple dropdowns

Is it possible that for the records that are being return back when Customer Name "Air Country" is selected that ones that don't have "Air Country" as the customter might not have a value in the Hotel Name or Collector fields on the record?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
CarlHRVA
Level: Powered On

Re: Help with filtering gallery on multiple dropdowns

Yes! All of the ones that are returned after the 5 correct Air Country ones do not have a collector assigned.

Super User
Super User

Re: Help with filtering gallery on multiple dropdowns

So it sounds like you don't want to apply all three conditione at once. You just want to apply one drop down selection at a time. Try this formula (hopefully there aren't too many typos):

 

If(!IsBlank(Dropdown4.Selected.Result), Filter('Collections DB','Customer Name' = Dropdown4.Selected.Result),
If(!IsBlank(drpdwnHotelName.Selected.Result), Filter('Collections DB', 'Hotel Name' = drpdwnHotelName.Selected.Result),
If(!IsBlank(Dropdown6.Selected.Result), Filter('Collections DB', 'Collector' = Dropdown6.Selected.Result),
'Collections DB')))

 This formula assumes only one drop down will have a selected value and that is the value you want to filter on.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
CarlHRVA
Level: Powered On

Re: Help with filtering gallery on multiple dropdowns

That worked perfectly. Thank you so much

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 89 members 4,165 guests
Please welcome our newest community members: