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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (5,096)