cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nhalvorson
Helper I
Helper I

Improved Search Response

I've got a basic app running with a searchable gallery on one screen. The items of that gallery are populated using the Search function and a text input/search box. This searches through a SharePoint list based on multiple columns. As long as the users type things in exactly the way they're found in the SharePoint list, this works exactly as anticipated.

My question is, is there a way to anticipate the most common typos or incorrect search terms, based on what I know my users are looking for, to still allow those bad searches to return results?

For example, I have a list of items and one column in the list is "Location". If the string in the location field is "cabinet" and the user searches for "locker", can I somehow equate those terms behind the scenes so that it gallery populates all of the items in "cabinet" even though my user didn't type "cabinet"?

1 ACCEPTED SOLUTION

Accepted Solutions
leyburn19
Memorable Member
Memorable Member

The way I would look at this is to create a list of search terms with those time of items. Then I would put a hidden label on on my search form that has a formula to return the additional item.   Label text would be something like First(Filter(Source,Column=Searchbox.text).Column

 

 

Then add this label to your filter to return values based on it as well

 

View solution in original post

3 REPLIES 3
leyburn19
Memorable Member
Memorable Member

The way I would look at this is to create a list of search terms with those time of items. Then I would put a hidden label on on my search form that has a formula to return the additional item.   Label text would be something like First(Filter(Source,Column=Searchbox.text).Column

 

 

Then add this label to your filter to return values based on it as well

 

Thank you! I couldn't figure out exactly where you were going with that, but that got me pointed in the right direction and I have something that works now.

I set a hidden label1 to a sequence of "if" functions to change the text value based on the search bar text: 
If(SearchBar.Text="locker", "cabinet", If(SearchBar.Text="typo", "correction", ...))

Then set the items in my gallery to:
Search(SPList, If(IsBlank(Label1), SearchBar.Text, Label1.Text), ColumnToSearch1, ColumnToSearch2, etc.)

Great, but I ould have concerns your searc is not delegable.  using isblank() breaks the rule. to protect tha I would also look at

 

Filter(SPList, Startswith(Col1,Label.Text) And StartsWith(Col2,Label.Text) etc

 

This type is delegable,  plus will show all if blank

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,465)