Dynamic Dataviewer Search

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”.

2 Likes