cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Manc_Gurl
Resolver I
Resolver I

Search & Filter but ignore filter if blank

I'm creating an app that has a combo box which should filter a gallery, I also want to use a Search box.  I was having an issue with the gallery showing as empty if there was nothing selected in the combo box so I got around the issue by using the following in the items property of my gallery:

 

If(IsBlank(cmb_Application.Selected.Result),Test,Filter(Test,Application.Value = cmb_Application.Selected.Result))

 

The issue now is that I want to use a search box but I can't figure out where the search bit should go in the above function.  I get an error no matter when I put it.

1 ACCEPTED SOLUTION

Accepted Solutions

@Manc_Gurl Make a small change. If you still have issues I'll need a screenshot.

Filter(Test,

   If(IsBlank(cmb_Application.Selected.Result), true, Application.Value = cmb_Application.Selected.Result) &&

   yourSearchBox.Text in yourSearchColumn

)

View solution in original post

5 REPLIES 5
CNT
Super User
Super User

@Manc_Gurl Try this (replace names as required)

Filter(Test,

   If(!IsBlank(cmb_Application.Selected.Result), Application.Value = cmb_Application.Selected.Result) &&

   yourSearchBox.Text in yourSearchColumn

)

 

@CNT  Hmm, it gives me a warning about delegation, which is fine but it now shows nothing in the gallery after entering this.

Filter(Test,

If(!IsBlank(cmb_Application.Selected.Result), Application.Value = cmb_Application.Selected.Result) && txtSearch.Text in Description)

 

I want the gallery to show unfiltered data (all data) unless somebody searches or selects something from the combobox

@Manc_Gurl Make a small change. If you still have issues I'll need a screenshot.

Filter(Test,

   If(IsBlank(cmb_Application.Selected.Result), true, Application.Value = cmb_Application.Selected.Result) &&

   yourSearchBox.Text in yourSearchColumn

)

@CNT 

Worked like a charm! Thank you for the super duper quick response 🙂

@Manc_Gurl Glad to help!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,045)