cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Gallery Filter question for a dropdown

I am having some odd behavior ... and I want to know the best practice way for doing this ...

 
 

 

 


I have a gallery that has plenty of rows. If I select a specific aircraft in the DdAircraftFilter dropdown list there is no problem.

 

Filter(CollectionComplianceApproval,ComplianceStatus.Value="Not Started" && Title=DdAircraftFilter.Selected.Result && IpPaxNameSearch.Text in TravelerName
&& IpRouting.Text in Routing && PaxOnTrip=true)

 

The gallery filters just fine when I select a value from the dropdown list (DdAircraftFilter)


But I have AllowEmptySelection set to true for the dropdown list in the hope that if the value is empty it will show all the rows that meet the criteria ignoring the dropdown. But that's not working.

This seems extreme but should I do ...
If(IsBlank(DdAircraftFilter.Selected),Filter(CollectionComplianceApproval,ComplianceStatus.Value="Not Started"  && IpPaxNameSearch.Text in TravelerName),Filter(CollectionComplianceApproval,ComplianceStatus.Value="Not Started" && Title=DdAircraftFilter.Selected.Result && IpPaxNameSearch.Text in TravelerName))

 

That does work but is there a cleaner more efficient code way to do that...

Basically it's a simple if...
If(IsBlank(DdAircraftFilter.Selected), code without the filter by the dropdown value, else filter with the dropdown value


The other thing is that allow it will default to the blank row once you select an aircraft you can't go to empty again...
The items value for the dropdown is ... Distinct(ComplianceApproval,Title) 
I figured the empty value would remain an option somehow.

How do I achieve that?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Gallery Filter question for a dropdown

Hello @sasrsc 

 

You might have better luck posting this in the Power Apps Community

 

Power Apps Community





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Gallery Filter question for a dropdown

Hello @sasrsc 

 

You might have better luck posting this in the Power Apps Community

 

Power Apps Community





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Helper II
Helper II

Re: Gallery Filter question for a dropdown

Whoops - I go between the two all the time and didn't realize. Thank you jcook.

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (8,789)