cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ttaylor Helper III
Helper III

Filter gallery based on a Choice field with ComboBox

I have a gallery where I want to display specific information from a Choice field. This filter works great: 

Filter(Datasource,ChoiceFieldName.Value = "NGO")

 

However, I would like the user to have a dropdrop down where they select the value to filter on, i.e. "NGO", "Company", "etc. Is this possible?  

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Filter gallery based on a Choice field with ComboBox

Hi @ttaylor 

 

Can you try out the below expressions:
 
Dropdown1 -> Items -> ["NGO", "Company"]
 
Gallery -> Items -> Filter(Datasource,ChoiceFieldName.Value = Dropdown1.Selected.Value)
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
MrNappa Advocate III
Advocate III

Re: Filter gallery based on a Choice field with ComboBox

Simply add a dropdown to your screen, populate it with the desired items (e.g. [ "NGO", "Company" ] ), then change the Filter to Filter(Datasource,ChoiceFieldName.Value = Dropdown1.Value )

 

ttaylor Helper III
Helper III

Re: Filter gallery based on a Choice field with ComboBox

That's what I originally had and it didn't work.

 

Filter(Datasource,ChoiceFieldName.Value = Dropdown1.Value)

 

Is it because the field value I want is a Choice column type in my Share point list? 

 

Dual Super User
Dual Super User

Re: Filter gallery based on a Choice field with ComboBox

Hi @ttaylor 

 

Can you try out the below expressions:
 
Dropdown1 -> Items -> ["NGO", "Company"]
 
Gallery -> Items -> Filter(Datasource,ChoiceFieldName.Value = Dropdown1.Selected.Value)
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (9,561)