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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,172)