cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
hnguy71
Level 8

Return All Gallery Items Where Dropdown Filter Is Blank

Good morning, everyone!

 

I have a dropdown that filters my gallery item when selected. For when there's something selected it works, but when it's blank, I'd like for it to return all the values. I think my formula is solid but the records returning are all empty.

 

I have a collection called DetailList and within my dropdown Items Property I am searching for distinct AcctUnit:

Sort(Distinct(Filter(DetailList, GM = _FindGM), AcctUnit), Ascending)

which gives me the right results:
right_dropdown_results.png
In my gallery in the Items Property I have this to filter and return the records:

Filter(DetailList, GM = _FindGM, If(!IsBlank(Dropdown1_1.SelectedText.Value), AcctUnit = Dropdown1_1.SelectedText.Value))

If I choose let's say 1413900 I return the all the filtered items:
returned_right_items.png
but when I don't choose anything I get a blank gallery:
blank_gallery.png

Any help would be greatly appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Return All Gallery Items Where Dropdown Filter Is Blank

@hnguy71 

Try to adjust your Formula as follows:

Filter(DetailList, 
GM = _FindGM &&
If(!IsBlank(Dropdown1_1.SelectedText.Value), AcctUnit = Dropdown1_1.SelectedText.Value, true)
)

You want the result of your If statement to return a true if the dropdown is blank so that the other records are matched.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
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.
2 REPLIES 2
Super User
Super User

Re: Return All Gallery Items Where Dropdown Filter Is Blank

@hnguy71 

Try to adjust your Formula as follows:

Filter(DetailList, 
GM = _FindGM &&
If(!IsBlank(Dropdown1_1.SelectedText.Value), AcctUnit = Dropdown1_1.SelectedText.Value, true)
)

You want the result of your If statement to return a true if the dropdown is blank so that the other records are matched.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
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.
hnguy71
Level 8

Re: Return All Gallery Items Where Dropdown Filter Is Blank

Omg thank you so much! Much appreciated! @RandyHayes I keep on learning new things everyday thanks to you!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 214 members 3,508 guests
Please welcome our newest community members: