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"?
Solved! Go to Solution.
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
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
User | Count |
---|---|
255 | |
112 | |
92 | |
48 | |
38 |