Explanation
First, when we arenāt searching for anything, we want to let them see everything in the data table. The filter rule below, where we get from a to zzz, grabs everything in the table.
Next is the complicated part. This is when we start searching. It works much like a dictionary, so if you know how to search for a word in a dictionary, the logic is very much the same.
Letās say we type āmā. If we pretend our data source is a dictionary, we look for the page that starts with āmā and we get all pages from that page to the end of the book. But this is not what we want. We want just the words that start with āmā, so we have to stop when we see ānā.
Letās now say we typed āmiā. We want all the pages that start with āmiā but end at āmjā.
So in Thunkable, we have two rules. One that tells the start, which is what the user typed, and one that gives the stopping point. In the second rule of the photo below, we are getting the last letter of what the user typed, and incrementing that letter by 1. So if the user types āmanā, the rules will look for words that start with and come after āmanā, but stop at any words that start with āmaoā.
Hey @brianl
Thank you for sharing this. I really like the idea!
While testing it, I ran into an issue with Two-word items, not showing.
For example, when I typed part or all of the second word (like āsodaā), the search returned nothing.
To fix this, I added a loop that goes through the whole list, checking if any item has more than one word. If so, and the second word contains the search term, I set that item name into a variable and use it in the filter.
Then a new issue came out, which happens when there are multiple list items with the same first word.
For example, if my list contained both āorangeā and āorange juiceā and I searched for āorange,ā only āorange juiceā was returned.
I solved this by adding another condition that verifies that it is the second word of the item name that contains the word.
Hereās the project I tested this on: https://x.thunkable.com/projects/68d5b119d2e35ec3b721aed4/
My only remaining issue is with duplicate second words. For example, if the list contains two or more items named ājuiceā (or āsodaā), only one of them is returned.
Do you have any ideas on how to handle this so all of them appear in the results?
Hm, yeah, it doesnāt work well if you search halfway through the word or the second word. The idea was to try to make it lightweight and as simple as possible.
If a complete dynamic search, it would probably lean less on filters and fully on loops. Might try that in the future to see what that might look like.





