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

Filter Gallery only when text is entered into search box

Hello Everyone,

 

I have a Gallery that displays all records from a list. I thought this would be an easy one but I'm struggling to get the search box to work. I can get it working fine with the following, but this doesn't display anything until something is entered into the search box:

 

 

Filter('LineName',ID = inpSearchBox.Text)

 

 

What I need is for all records to be displayed until an ID is entered into the search box. I've tried this and it doesn't error but it brings back no results, regardless if the search box is empty or not:

 

 

If(IsBlank(inpSearchBox), Filter('ListName',ID = inpSearchBox.Text))

 

 

What am I missing here as in my head this should be really simple? I haven't done a great deal with Gallery's and filtering so any help would be much appreciated as I'd also like to include filtering on a column called Status, one called Risk Rating and another called Meeting Details but cant even get a simple search working at the minute!

 

ID is the ID field, Status, Meeting Details and Risk Rating are drop downs. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

One thing is you are missing what to do if the search is blank

another thing is you are telling it to filter by the searchbox if the searcbox is blank

Should be like the following:

 

If(!IsBlank(inpSearchBox), Filter('ListName',ID = inpSearchBox.Text),Listname)

You should do !IsBlank because that gets it if there is a value in the search box.

View solution in original post

Highlighted
Super User III
Super User III

Try using search;

Search('LineName',inpSearchBox.Text,"ID", "Column2","Column3")

 

Or

 

To use Filter;

If(IsBlank(inpSearchBox),

LineName,

Filter('LineName',ID=inpSearchBox.Text)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

One thing is you are missing what to do if the search is blank

another thing is you are telling it to filter by the searchbox if the searcbox is blank

Should be like the following:

 

If(!IsBlank(inpSearchBox), Filter('ListName',ID = inpSearchBox.Text),Listname)

You should do !IsBlank because that gets it if there is a value in the search box.

View solution in original post

Highlighted
Super User III
Super User III

Try using search;

Search('LineName',inpSearchBox.Text,"ID", "Column2","Column3")

 

Or

 

To use Filter;

If(IsBlank(inpSearchBox),

LineName,

Filter('LineName',ID=inpSearchBox.Text)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,629)