# \[Solved\] Selecting one of hundreds of lists from a dataviewer and getting the values in that list?

**URL:** https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749
**Category:** Questions about Thunkable X
**Tags:** solved, beginner, lists, listview, data-source
**Created:** [September 19, 2022, 4:57pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749 "2022-09-19T16:57:42Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 19, 2022, 4:57pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/1 "2022-09-19T16:57:42Z")

</div>

I want to create an app that inspires writing by taking a single word, selected from a dataviewer, and listing words that are similar.

For example, a writer wants to write a scene about how beautiful winter is but doesn’t know how to describe winter very elegantly. They would find the word “winter”, see the associated words to help describe it (“snow”, “white”, “cold”, “lonely”,“gentle”, etc), and then describe the scene using these extra ideas.

I just began using Thunkable recently so I don’t know much about it.

These are my thoughts so far:

1. The datasource (with words and their associated words) will be in an google sheets table (because that’s the only one I’m familiar with right now) with all the list names on the first row and the data in vertical columns below each name. Then I will be able to hold hundreds of lists in the same file.

What I have successfully done so far:

1. I have successfully imported a datasource and verified that all the correct list names and list values are there.
2. I have created a button which will make the listview visible, allow the user to select a value from a list, after which the listview will become invisible again and the button text will be replaced with the selected list item (e.g. I press the button, select “one” from the list view, and the button now says “one”).
3. I have found a way to randomly select a value from a specific list using the randomnumber function with row id.

My difficulties so far:

1. Although I have successfully gotten data from a list, the list was preselected before I tested the app. I could only program it to show data from a single list which was specified by name beforehand. This is very limited because I want the user to be able to select their list name and THEN get the corresponding list values to that list.
2. I don’t understand the other types of datasources well enough to determine if this would be possible with them instead of google sheets (i.e. will airtable or excel allow me to do something different?).

If anything in this explanation doesn’t make sense, please tell me.

Also, if this isn’t possible in Thunkable, please tell me now before I waste too much time and effort.

Thanks.

---

<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: [September 20, 2022, 9:46am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/2 "2022-09-20T09:46:45Z")

</div>

Welcome to Thunkable.

The best approach is to either provide screenshots of your code and example outcome or provide a shared link to the project or a project that reproduces your issue so other can look into it and provide suggestions.  
You will also need a shared link to your Google sheet or a sample sheet with the same structure.

---

<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: [September 21, 2022, 6:23am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/3 "2022-09-21T06:23:37Z")

</div>

i took the liberty of interpreting your request. you probably need a structure opposite to what you originally thought. i assumed you might need a google sheet that looks like this:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/4/3466a97b56e6f54a03bdf17fab6ed71c242c5109.png)

my first screen shows the sorted list of all words in column **word** so it’s really using a data source pointing to the spreadsheet.

it’s a different story for processing the word that was selected, i’m using the Visualization API Query Language from google because it features a fast way of obtaining row/s from the spreadsheet using a simplified SQL statement with a WHERE condition and the returned value is a json string containing the row/s that satisfy the query.

you can read more about this process [here](https://community.thunkable.com/t/quiz-app-using-google-sheet-via-googles-visualization-api-query-language-instead-of-data-source/1866448)

here’s the word selection screen  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/8/38b477af5e2c14264e7d4a9a05c12cf1710f33ee.png)  
and here’s what you get when you select a word to obtain the related words:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/e/8e7b1b47f834c207afa1eaeaa8e04317ed89c571.png)  
.  
here’s the link to the spreadsheet:

> **[wordplus](https://docs.google.com/spreadsheets/d/18jtMRFEy0ytpV0t10AXAXNl41SDwosi8F66XrKjLBUQ/edit?usp=sharing)**
>
> Sheet1
> 
> word,rword\_list
> winter,brisk,biting,blustery,chilly,cold
> voyage,journey,pilgrimage,tour,travel,trek,trip
> teacher,creative,dedicated,passionate,caring,grateful,excited,motivated
> seashore,bank,coast,seafront,seaside
> decision,conclusive,critical...

and here’s a link to the project  
[https://x.thunkable.com/projects/632aa7733b27ec0224e0513a/ab6da954-35cf-4ab8-ac85-36bf9caa8d45/designer](https://x.thunkable.com/projects/632aa7733b27ec0224e0513a/ab6da954-35cf-4ab8-ac85-36bf9caa8d45/designer)

i hope this works for you.

---

<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: [September 22, 2022, 10:51am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/4 "2022-09-22T10:51:24Z")

</div>

Hey @jaredsbror5 did these examples help you get over the finish line on this

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 23, 2022, 4:34pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/5 "2022-09-23T16:34:19Z")

</div>

I won’t be able to check until tonight because I have to work, but I promise that I’ll check tonight.

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 26, 2022, 6:33am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/6 "2022-09-26T06:33:41Z")

</div>

I am running into a problem with running a copy of your project.

Before I say what that is, I just want to say that I don’t understand how WebApi works, so I am first trying to get the app working exactly as yours does. I know that copying isn’t the same as learning, but right now I’m focusing on getting something done.

With that in mind, I will explain the issue.

Whenever I test out your project directly from your project (which is read only) it works just fine. However, whenever I make a copy of your project to see what you’ve done and I test it, I can click on the first word\_list but not the second page because the second screen disappears about one second after popping up.

Testing the original:

> **[Download files - Filemail](https://www.filemail.com/d/ilxhedngzhuygra)**
>
> Click here to view and download these shared files from Filemail.com

Testing the copy:

> **[Download files - Filemail](https://www.filemail.com/d/ovfgmnjtpjgauqa)**
>
> Click here to view and download these shared files from Filemail.com

Apparently the error is here, and the error only exists in the copy projects.

 ![snip1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/450454739a7c3037118157220357febb7ef94bf3.png)

As far as I can tell the error (on the bottom left) occurs because there is no Text\_Input6 anywhere in the project.  
 ![snip2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/9/0987137a4d491d6810bf583b4c49fd5ac5c27909.png)

What is the purpose of this statement?

* * *

Some other questions real quick.

1. Can I simply delete all datasources besides wordplus? They seem unused.

2. Can I delete webApi1 and Alert1? They seem unused.

* * *

If you could help me, that would be awesome! It’s good to know that what I asked is possible.

---

<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: [September 26, 2022, 7:17am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/7 "2022-09-26T07:17:32Z")

</div>

> [@jaredsbror5](#):
>
> What is the purpose of this statement?

I will try to answer this question until you get a response from @manyone himself.

@manyone is not using the Thunkable standard way of connecting to a data source using the connection option but instead using the `Google Visualization Service`. In this service, the Google sheet is presented in a JSON form inside a **non-JSON** header so to be able to work with the JSON part is is necessary to read only part of the Visualization response therefore `Input6` was used just to check that the correct part of the response is obtained. The actual work is done using the variable `gswdobj`.

Hope this helps.

---

<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: [September 26, 2022, 6:52pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/8 "2022-09-26T18:52:04Z")

</div>

thanks @muneer! you are correct - i was just using it to verify the return response i get after the webapi call - i simply forgot to remove it. it is ok to remove.

---

<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: [September 26, 2022, 7:21pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/9 "2022-09-26T19:21:26Z")

</div>

when a thunkable app uses a worksheet as a data source, and you try to remix it, the worksheet turns into a local db. to restore the original design you need to do the following:

1. save the spreadsheet (i gave a link) under the same name in your google drive.
2. bring it as a data source inside thunkable.
3. delete the old db from the data source.
4. edit your thunkable app and redo all references to the old db so they point to the new one. by redo, i mean, bring the block related to the new db and transfer the enclosed contents from the same block in the old db the delete the old block.

regarding the text\_input6 variable,please delete if from the project - i was using it for debugging

yes you can delete all other datasources besides wordplus. you can also delete webapi1 and alert1 (they are remnants from an old project).

you have to replace the markedfield value below so it points to YOUR spreadsheet

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

here’s how to obtain the value  
go to [drive.google.com](http://drive.google.com) and open your version of wordplus google sheet, press the Share button at the right upper corner. under General Access click Anyone with the link, then press copy link - it will be now in your clipboard, paste it in notepad and delete tail end as shown below.

for example,

`https://docs.google.com/spreadsheets/d/118jbb1tOsZgeH18XSLmiTZ7Ft3hrMwYTKRshNJm1tI8/edit?usp=sharing`

the remaining string below is what you paste unto the highlighted field in the block above.  
`https://docs.google.com/spreadsheets/d/118jbb1tOsZgeH18XSLmiTZ7Ft3hrMwYTKRshNJm1tI8`

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 26, 2022, 7:43pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/10 "2022-09-26T19:43:18Z")

</div>

Thanks for the advice. I was able to get it to work by getting the right datasource in the project and I deleted all the unnecessary components, creating a barebones project right here:  
[https://x.thunkable.com/projects/6331ed1a2014e30224fedc9c/7a7cae1f-dc17-4ec3-8e14-bc47f2cdabf3/designer](https://x.thunkable.com/projects/6331ed1a2014e30224fedc9c/7a7cae1f-dc17-4ec3-8e14-bc47f2cdabf3/designer)

However I have some more questions about the specific sections right here:

 ![Snip1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/f/3f7acf1773bc054de43fa66401f82f5c3df7d65f.png)  
What is the /gvis/tq?tq=?

 ![Snip2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/686e011594052a54ea9ba60c562967b435a2a056.png)  
What does the select A, count(B), etc mean? What does the %27 mean?

![Snip3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/6/66f1d3db76180e94091df8db1ef10bb1ff42cebd.png)  
From what I understand of WebApi’s, a signal is received, verified, then sent back. How do these variables relate to webapi’s and their signals?

 ![Snip4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/2/52c55699a16e477c7158ffb725026d0ca2918b66.png)

1. Does this mean my lists can only be 48 characters long? Do I have to adjust the length of the string depending on the amount of items?
2. What is the table.rows( - ).c[1].v?

Now that I have a working example, I want to understand it better.

---

<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: [September 26, 2022, 8:21pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/11 "2022-09-26T20:21:30Z")

</div>

_What is the /gvis/tq?tq=?_  
gvis is a required parameter for reading a google sheet but intended for google’s visual language. tq?tq= is also required. all together it might be saying, read the sheet for google’s viz language using this text query.

_What does the select A, count(B), etc mean? ?_  
pardon me about that - it’s a comment box from the last project i copied this from - it should have read - (as a comment and as a query) - select B where A=‘(the item selected)’. it is query, like SQL (structured query language) being used in real databases, but simplified - yet powerful for most needs.  
in the above, A refers to the first column, B refer to the 2nd column - hence the query string “select B where A=‘(the item selected)’” is really saying, get me column B for ALL rows from sheet where column A equals the value supplied bounded by apostrophes.

_What does the %27 mean?_  
i believe it means apostrophe (ie. single quote)

_How do these variables relate to webapi’s and their signals?_  
webapi is one of 2 ways for thunkable to communicate with a site in the internet

this block

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/97d57877f30d81c5aaa26daf46b091efc24623d6.png)

is like typing this on your browser:  
`https://docs.google.com/spreadsheets/d/18jtMRFEy0ytpV0t10AXAXNl41SDwosi8F66XrKjLBUQ/gviz/tq?tq=select%20B%20where%20A%3D%27winter%27`

go ahead, try it - and see what you get!  
so it is important to define and encode your query just right.  
in this example we know there are no duplicate words (ie. only one “winter”) but this query feature is capable of returning multiple rows.  
for example you can code, “select name, item\_bought, price where date=‘2022-09-26’ and age\>24”  
and you can get all rows that satisfy that condition.

_Does this mean my lists can only be 48 characters long? Do I have to adjust the length of the string depending on the amount of items?_  
the json string is found at column 48 of the returned response.  
_What is the table.rows( - ).c[1].v?_  
it refers to value of the variable at the first row, column 1 (ie. c[1].v)

read more about this access method in this link and the embedded link:

> [@Quiz App using google sheet via google's visualization API Query Language (instead of Data Source)](https://community.thunkable.com/t/quiz-app-using-google-sheet-via-googles-visualization-api-query-language-instead-of-data-source/1866448):
>
> i’ve just recoded my earlier quiz app which used airtable as datasource into a new version using google sheet as source of the quiz but NOT as a data source. Instead i’m using Google’s Visualization API Query Language to read the worksheet (see this recent [discussion](https://community.thunkable.com/t/get-data-from-google-sheets-without-using-the-data-source-blocks/1863069/9) in the forum ). It’s a different approach for working with google sheets, but i like it! below is the contents of my worksheet. ( Note - in order to use the query language, the worksheet must first be shared such that anyone wit…

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 29, 2022, 9:37pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/12 "2022-09-29T21:37:04Z")

</div>

Thanks for all the help you’ve given me so far.

I have what should be my final question on this thread.

Why is my app giving me errors when I use any dataset besides yours?  
If I modify the dataset with the lists of words and rword\_lists, whenever I click on a list name on the list of “words”, it then gives me a blank white screen when testing. The google sheets which I am using is also public ([CreativeWordsSpreadsheet - Google Sheets](https://docs.google.com/spreadsheets/d/17JEWG0RH7v7TPJ6wy5YFORjn0rxCXd6XAhZcy4_q7ns/edit#gid=0)) so apparently that shouldnt be an issue (according to your quiz app description)

Here is a video which shows it.

> **[Screen Recording (9-29-2022 3-28-34 PM).wmv](https://drive.google.com/file/d/1GF8rvensHY5TMhFp06ZYfHvkPDdRE6S7/view?usp=sharing)**
>
> Google Drive file.

The lists work fantastically when they don’t give me white screens. If I can just get over the hurdle of creating my own datasources, then I can create custom lists.

Thanks!

---

<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: [September 29, 2022, 10:36pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/13 "2022-09-29T22:36:59Z")

</div>

can you share your project link? do not use the’share’ button… instead,edit your program as normal then cut n paste to me the actual url of the project

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 29, 2022, 11:52pm UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/14 "2022-09-29T23:52:56Z")

</div>

I’m going to send you the link through private messaging.

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 30, 2022, 12:00am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/15 "2022-09-30T00:00:59Z")

</div>

I sent it. If you didn’t receive it, send me a message.

---

<div class="post-metadata">

### Author: ![jaredsbror5](https://avatars.discourse-cdn.com/v4/letter/j/71e660/32.png) [@jaredsbror5](https://community.thunkable.com/u/jaredsbror5)
#### Post date: [September 30, 2022, 4:30am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/16 "2022-09-30T04:30:38Z")

</div>

For reference for anyone reading this, this is the answer I got.

> [@On another topic](https://community.thunkable.com/t/2063688/2):
>
> look at your selectword start block
> 
> ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/d/8d5b7da916fb5cb09b2dc7a939ad4a3b80c807f7.png)
> 
> the value pointed to by the arrow is invalid.  
> it is supposed to be the lnk to your spreadshhet but minus the edit parameter.
> 
> currently,your spreadsheet link (the one you included called “creativesomething…”) looks to me like this:
> 
> `https://docs.google.com/spreadsheets/d/17JEWG0RH7v7TPJ6wy5YFORjn0rxCXd6XAhZcy4_q7ns/edit#gid=0`
> 
> if you remove the part starting with “/edit#…” , then the remaining value is this:  
> `https://docs.google.com/spreadsheets/d/17JEWG0RH7v7TPJ6wy5YFORjn0rxCXd6XAhZcy4_q7ns`
> 
> (in my last post, i gave instructions how to obtain this from your sheet.)
> 
> this is the value you should put in that field above (you are still pointing to MY spreadsheet)

It works perfectly now. Thank you for all your help!

---

<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: [December 29, 2022, 4:30am UTC](https://community.thunkable.com/t/solved-selecting-one-of-hundreds-of-lists-from-a-dataviewer-and-getting-the-values-in-that-list/2048749/17 "2022-12-29T04:30:41Z")

</div>

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