cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to filter based on dropdown value ONLY when user selects value from dropdown

I have a dropdown that I'm using to filter entries in a Gallery. The user selects a value for the dropdown and then on the next screen the Gallery only shows entries that match the dropdown's value.

Now I want to make it so that the Gallery is only filtered on the dropdown value when the user selects a value from the dropdown. As you know, the dropdown default value is set to the very first item in the dropdown, so even if the user doesn't interact with the dropdown, the Gallery will still filter on that first item that is the default dropdown value.

 

Is there some other way to implement this scenario? How else can I get the Gallery to filter based on dropdown value ONLY when the user actually selects a value from the dropdown?

2 REPLIES 2
hpkeong
Level 10

Re: How to filter based on dropdown value ONLY when user selects value from dropdown

Hi

Yes, it is possible but you have to do a trick by using
- ClearCollect.

(I have just replied to a post today on Multi Filter and the method is the same).

Set the gallery.items = anyname

On another screen with Dropdown
Dropdown.items = Distince(Datasource, fieldtodilter)
Dropdown.Onchange = ClearCollect (anyname, Filter(Datasource, fieldtofilter = Dropdown.Selected.Result)

So, when you want to view only selected items based on dropdown, after selection, have a button to just navigate to the gallery scree.

But if you want to view all data ONLY, have another arrow or button with
ClearCollect (anyname, Datasource); Navigate(....)

The rest you can try to modify to ensure it works to and fro.


Hope this helps.

Tq


hpkeong
Anonymous
Not applicable

Re: How to filter based on dropdown value ONLY when user selects value from dropdown

how can this be applied on a data table, doesn't work when I tried it

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,909)