# Can anybody explain how to search items in a list (from airtable)?

**URL:** <https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649>\
**Category:** Questions about Thunkable X\
**Created:** [February 9, 2020, 6:20pm UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649 "2020-02-09T18:20:13Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 10, 2020, 10:24pm UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/21 "2020-02-10T22:24:39Z")

</div>

_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”):

![Screen Shot 2020-02-10 at 2.11.07 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/c/3c49cf797cfc38f8e0ecb503bef9d641e5f9eb2e.png)

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.

---

<div class="post-metadata">

**Author:** ![chris.bailey230698t](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chris.bailey230698t](https://community.thunkable.com/u/chris.bailey230698t)\
**Post date:** [February 10, 2020, 10:38pm UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/22 "2020-02-10T22:38:57Z")

</div>

Thanks for this! I added upon this and now I have it almost working.

Here are my blocks:

![Annotation 2020-02-10 222340](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d74ee148d2be1a8b3e7b7900c29d36af52835018.jpeg)

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…

 ![ezgif.com-video-to-gif (4)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/5/d5243657e25f1b2af2b73088fc9b1807c796e66f.gif)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 10, 2020, 11:42pm UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/23 "2020-02-10T23:42:23Z")

</div>

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

You need this block:

![Screen Shot 2020-02-10 at 3.34.29 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e5d93e8d7a9ea8e2503c13577c22b44c90f40dec.png)

---

<div class="post-metadata">

**Author:** ![chris.bailey230698t](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chris.bailey230698t](https://community.thunkable.com/u/chris.bailey230698t)\
**Post date:** [February 11, 2020, 1:16am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/24 "2020-02-11T01:16:37Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [February 11, 2020, 1:52am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/25 "2020-02-11T01:52:31Z")

</div>

Hi, @chris.bailey230698t! 👋

You have just a small thing to do with my example, which is -

- You have not set the variable `x` to anything - that’s why nothing appears.
- So, when you get the column, set the variable `x` list to column.
- Before setting the list, make sure you clear the entire list `x`, before getting the column.

By this, my example should perfectly work for you. 👍

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![chris.bailey230698t](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chris.bailey230698t](https://community.thunkable.com/u/chris.bailey230698t)\
**Post date:** [February 11, 2020, 2:00am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/26 "2020-02-11T02:00:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 11, 2020, 2:12am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/27 "2020-02-11T02:12:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chris.bailey230698t](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chris.bailey230698t](https://community.thunkable.com/u/chris.bailey230698t)\
**Post date:** [February 11, 2020, 2:24am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/28 "2020-02-11T02:24:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [February 11, 2020, 3:25am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/29 "2020-02-11T03:25:20Z")

</div>

Hi, @chris.bailey230698t! 👋

I have made a rough structure of how your blocks would look -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/c/dc221bffabfa15a594b37dedffb137ce1e648162.png)

* * *

You can get the variables `x` & `y` by right-clicking the purple function -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/4639424b671224b61d8bdec3452b83efecfd9aa9.png)

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![chris.bailey230698t](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chris.bailey230698t](https://community.thunkable.com/u/chris.bailey230698t)\
**Post date:** [February 13, 2020, 9:01pm UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/30 "2020-02-13T21:01:14Z")

</div>

Thank you for this!! 😃 Do you know how I could make it so that the list refreshes itself when the search box is empty?

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [February 14, 2020, 2:55am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/31 "2020-02-14T02:55:15Z")

</div>

Hi, @chris.bailey230698t! 👋  
I am glad my solution worked for you 😊

If you are using my solution for _how to search_, you can modify your blocks like this -

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/b/0b3de333018cc8a864f3517c97c0faaf89650300.png)

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:41am UTC](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649/32 "2024-11-08T11:41:00Z")

</div>



[Previous page](https://community.thunkable.com/t/can-anybody-explain-how-to-search-items-in-a-list-from-airtable/454649.md?page=1)
