app entireList has to have data. The updateTempList function loops through its items to look for something that matches whatever you’ve typed in your text input field.
Try adding this and then testing by searching for any of the fruits in that list (e.g. “apple”):
After you successfully test it, you’ll need to populate app entireList or replace that block everywhere with your actual list that should be searched.
Thanks for this! I added upon this and now I have it almost working.
Here are my blocks:
So this has called the text items from my populated item-list, however the problem now is that when I get rid of the text in the search box and enter new text, nothing appears. I imagine this is because it’s looking into the list that’s being displayed. So if it’s only showing three results, it’s going to search those three results for the newly entered keyword. Now I need to figure out how to make it totally repeat the process when a new search is entered…
app entireList needs to be just that: the entire database. It should include ALL of the items you ever want to search (i.e. all possible items).
Edit: in the screenshot right above, you’re populating it with from Item-List get text items. That’s not going to work for a loop, really. You need to assign a variable the value from Item-List get text items and then use that for the search loop.
Thanks @tatiang, I am trying to run some tests with this and it seemed to be working but now the app crashes every time I open try to open the list - as in when I click through a restaurant as seen in the above GIF from earlier on. I will keep at it and see if I can sort it out!
Made the mistake of updating my app to solve the problem, now the thunkable app won’t even open…
Thank you @kartik14 How do I set the x to the column when it was created in a function? Do I need to initialise it? I’m not sure where the column will fit in?
If you are using a variable created in the function, you could put the function initialization block in the then do section of your airtable get column/ block. Then put the column value (green block)from airtable into the variable input of the function and initialization block
So the search function is now working using the @tatiang method however I will give the @kartik14 one another try to see how they compare using your advice @jared in regards to the column block! Unfortunately I’m having some real issues with the most recent update to the Thunkable app which is making everything take much longer as it keeps crashing
Okay so I have this working the same way as the @tatiang method but I need the list to reset when the search box is emptied… I’m assuming I need it to break out of the process and return the list to it’s original state before the search submission was made but I’m not sure how this is done? I’m sure I’ve seen this mentioned elsewhere so I’ll scour through the other posts and see if I can find it!
I’m now trying to set it so that the search button turns into a cross (delete) button that will reset the list - which should work in the meantime and seems to be getting somewhere! Unfortunately the problems with the Thunkable app are making it too difficult to work with so I will be leaving this for the morning!