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

Gallery Items Disappear When Filtering

I have a Gallery and a Dropdown set up as the Filter for the Gallery. If the user doesn't select anything from the Dropdown, no Filter will be applied to the Gallery whatsoever. But, the Gallery Items completely disappear when the user enters this screen. For some reason, they are required to select a filter from the dropdown, and then back to the default choice if they want to see the entire unfiltered gallery.

 

I'm currently using an SP list as data source. The formula I'm using to filter the gallery is the following:

 

Filter(Projects,Or(Filtros=Dropdown1.Selected.Value,Region=Dropdown1.Selected.Value))

 

And I have created an extra column on my SP list called "Filtros" which has the same value for every single item on the list.

 

 I had already been able to make this work on another app, and with multiple filters, but on the one I'm currently working on is being really stubborn.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@Anonymous 

Give this formula a try...

 

Filter(Projects,
If(!IsBlank(Dropdown1.Selected.Value), Filtros=Dropdown1.Selected.Value || Region=Dropdown1.Selected.Value, true)
)

 

This will check to see if anything is selected and then apply the comparisons.  Otherwise, it will just return everything.

 

I hope this is helpful.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

1 REPLY 1
Super User III
Super User III

@Anonymous 

Give this formula a try...

 

Filter(Projects,
If(!IsBlank(Dropdown1.Selected.Value), Filtros=Dropdown1.Selected.Value || Region=Dropdown1.Selected.Value, true)
)

 

This will check to see if anything is selected and then apply the comparisons.  Otherwise, it will just return everything.

 

I hope this is helpful.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (88,359)