# How to create a search engine from text input, based on data from couple columns - google sheets

**URL:** <https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019>\
**Category:** Questions about Thunkable X\
**Tags:** design, beginner, google-sheets\
**Created:** [March 13, 2022, 1:15am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019 "2022-03-13T01:15:32Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 13, 2022, 1:15am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/1 "2022-03-13T01:15:32Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/0/803669c8e3897306a3a8d3566023a6a5c396d7a8.png)  
I have a problem - I am trying to make a search box, based on text input, which should search data from three different columns from google sheets… but it’s not working:/ I don’t know what to do:/ anyone had same/similar problem? How to get this right?

---

<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:** [March 13, 2022, 1:37am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/2 "2022-03-13T01:37:20Z")

</div>

You need to take this one column at a time to start with.

I’m not sure if you meant to loop (_count with_) from 1 to 3 but the length of a list with three items is 3.

And you’re comparing the text input value to the **length** of the list. Is that what you want? So I’d have to type in 3 to get a match there. Nothing else will match the length.

So start over and make it work for one column. When you have that, paste a screenshot and someone can help you adapt it for multiple columns.

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 13, 2022, 1:55am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/3 "2022-03-13T01:55:38Z")

</div>

![Untitled2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/3/136de770906c1f4d697ca103d08ede62ab9a9e69.png)  
It’s still not working:/  
Basically - I want to put numbers/words, that will be “search” in three different columns at the same time:  
example: if I will write “book” - app should try to find this word in column “description”, “SKU” and “SKU2” and show me result in data viewer list.

---

<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:** [March 13, 2022, 2:31am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/4 "2022-03-13T02:31:32Z")

</div>

You can use the Does Contain list block to check if a list of values contains a particular item. Or you can use the “find first occurrence of” block to find out which row the search term is in. You really don’t need a loop at all.

You can see an example here:

> [@\[Solved\] How can I identify which map marker was clicked?](https://community.thunkable.com/t/solved-how-can-i-identify-which-map-marker-was-clicked/1775376/2):
>
> Have you verified that the “latitude” and “longitude” values of the green event block exactly match values in your Airtable column? Have you assigned labels to each of the four values (two lat/lon pairs) you’re testing to make sure you’re seeing what you expect them to be? Your blocks look really convoluted to me. Why not just use “find first occurrence of” block in the List drawer to see if the “list of values” from Airtable contains the lat/lon value you are getting from the event block? If t…

Also see the Analyze List section of the documentation:

> **[Lists Blocks | Thunkable Docs](https://docs.thunkable.com/lists)**

---

<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:** [March 13, 2022, 2:46am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/5 "2022-03-13T02:46:20Z")

</div>

How many records are we talking here?

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 13, 2022, 4:45pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/6 "2022-03-13T16:45:40Z")

</div>

In whole spreadsheet you have 1871 parts with proper SKU number and Quantity XD

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 13, 2022, 9:04pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/7 "2022-03-13T21:04:43Z")

</div>

Start with something like this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/1/81b4936a93ac8ff3564706197f531ca9cc5023dc.png)

You can then make it do whatever action you require when the search entry is found.

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 19, 2022, 8:01pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/8 "2022-03-19T20:01:09Z")

</div>

![Untitled3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/c/1cbe301e139cafa62a10d30d85a8e512fea77f56.png)  
Muneer - I’ve tried - but this is not at all making a list “smaller” - list is not changing into list with “text\_input” suggestions 😕

It is a google spreadsheet, putted into list viewer… network is not helping at all 😕  
… and it’s kinda important to finish this project pretty soon 😕

By myself - I’ve tried - at least - about hundred different options (from different websites and from my head) - non of them worked so far:/

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 19, 2022, 8:09pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/9 "2022-03-19T20:09:30Z")

</div>

This will never work.

You are initializing `stock_list` as **empty list** but when the screen starts you are assigning it a number (`number of rows in....`) and then you are using it in your function `updatetemplist` again as a list but it is not containing a list so this function will always fail to perform any search.

Hope this is clear.

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 19, 2022, 8:25pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/10 "2022-03-19T20:25:25Z")

</div>

Thanks Muneer 😃  
I am beginner of this… and I kinda stuck:/ How should I change it to have a working search box?  
Thanks:D

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 20, 2022, 8:11am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/11 "2022-03-20T08:11:49Z")

</div>

is this what you wanted to do? sheet1, filtered by sheet2 becomes sheet3?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/2/7220101277de30d3be15026d04070b253136ed9c.jpeg)

sheet1 is my original  
sheet2 is where i put the word i’m searching for, in this case “A”  
sheet3 is the result. NOTE the formula in A2 - you only have to put this formula in A2 only  
and it will perform the filtering automatically. it will show all rows where the word “A” is found in description OR sku1 OR sku2.

just make your thunkable populate sheet2!$a$2 and get your results in Sheet3

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 20, 2022, 10:31pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/12 "2022-03-20T22:31:46Z")

</div>

It can work - but - at the same time, I need to enter details from sheet1 and be able to edit that:/

- is there a possibility to make everything based on sheet1 only?

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 21, 2022, 12:31am UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/13 "2022-03-21T00:31:11Z")

</div>

> [@barchom91ahltd](#):
>
> I need to enter details from sheet1 and be able to edit that:/

what do you mean, you always have access to any row in the sheet from thunkable. in order to edit, you should setup your thunkable program to retrieve a row, provide input fields to allow data and entry and update that row in the google sheet.

my suggestion requires that you get your data from sheet3 not sheet1 - i think that’s what you meant. so you cannot easily update sheet1.

to do a search the way you want it, you can use the method suggested by @muneer - after you’ve mapped your DVL to your sheet , iterate over the DVL and if anything satisfies your required condition/s, set visibility of that DVL item to true else set visibiility to false.

see the method i suggested here:

> [@Create individual buttons to return individual filters from a range in a Google Sheet](https://community.thunkable.com/t/create-individual-buttons-to-return-individual-filters-from-a-range-in-a-google-sheet/1781042/2):
>
> this short demo illustrates the functionality you desire: enter day of week (1=monday…7=sunday) and the resulting list is filtered from the original list, showing all rows that have the corresponding day of week is populated. at the start, the list shows the full list then enter a one-digit day of week (eg. 3) at top and the displayed list should change to show only those rows that have wednesday (dayofweek=3) in them the number being displayed on the right (eg. 35…

maybe this method will work for you

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 22, 2022, 9:49pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/14 "2022-03-22T21:49:24Z")

</div>

I change spreadsheet from google sheet to airtable- is now any chance to filtered data to text from text input?

---

<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:** [March 22, 2022, 11:04pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/15 "2022-03-22T23:04:09Z")

</div>

You have several options with Airtable:

1. You can use a formula in a cell/column in Airtable and just get data from that filtered column
2. You can get all of the Airtable data and then do filtering within Thunkable (I don’t recommend this)
3. You can use the Airtable API to create almost any custom filter formula. It’s powerful but it returns data in JSON format so you have to be comfortable parsing (separating) values from JSON.

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 23, 2022, 6:40pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/16 "2022-03-23T18:40:30Z")

</div>

Good:D so - which block and how I should put them to make a search box, which is text input? I need to have an option to search in three different columns: descrption, SKU and SKU2 (barcode) - how to make it happen? I was trying with “lenght…”, “contains”, “get” and “count to” - nothing works:/ I was trying to include those informations into text input, that muneer showed - still no results:/ I really need to figure this out:/ maybe local db will help with filtering data?

---

<div class="post-metadata">

**Author:** ![barchom91ahltd](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@barchom91ahltd](https://community.thunkable.com/u/barchom91ahltd)\
**Post date:** [March 23, 2022, 10:17pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/17 "2022-03-23T22:17:09Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/1/c1dcf2869cbbafac537640d82d23b79bf7c825c5.png)  
I came back to my testing version (google spreadsheet) and I managed that…  
The problem is that it still not working, but(!) something is happening with data viewer list, cause after couple seconds after submit text input, data viewer list disappearing and instead of that I have loading icon and… that’s all 😕

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 21, 2022, 10:18pm UTC](https://community.thunkable.com/t/how-to-create-a-search-engine-from-text-input-based-on-data-from-couple-columns-google-sheets/1781019/18 "2022-06-21T22:18:09Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
