# Not able to access data from Google Sheet in app

**URL:** https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227
**Category:** Questions about Thunkable X
**Created:** [September 20, 2023, 1:42pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227 "2023-09-20T13:42:42Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [September 20, 2023, 1:42pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/1 "2023-09-20T13:42:42Z")

</div>

Hi,

I was helping out @e.fat4z3b with his query about creating a quiz app. Instead of hard coding questions in the app, I thought it best to use a datasource, so I created a Google sheet but could not get the data pulled into the app. The data shows up though when I click on the datasource. I then created a local datasource with the same information and can pull the data into the app.

Not sure what I am doing wrong.

Google Sheet Datasource, blocks and preview

 ![2023-09-20 09 29 50](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/d/ad864ad0f47fb9f36bae9f7dc758d93ba27a8330.png)

 ![google](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b9b7aba14841d8913b437f0d967e25074a7d358b.png)

 ![2023-09-20 09 29 49 (2)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/970b0691caf830e7c28512c3667d925cd0b04d3f.png)

Local Datasource, blocks and preview

 ![2023-09-20 09 29 49 (3)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8a8835dd48f40170176fc3b1d3b21cd4b70b20fa.png)

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

 ![2023-09-20 09 29 50 (2)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/b/8b3d03c658b267974e1a3572bd440089ba040f9c.png)

Thanks  
Steve

---

<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: [September 20, 2023, 2:16pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/2 "2023-09-20T14:16:43Z")

</div>

What happens if you assign a `get value` data source block to a label’s text and set the row id to 1 (using a math block)?

Are you able to see a cell value from the Google Sheet that way? If not, post a screenshot of that attempt.

---

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [September 20, 2023, 5:19pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/3 "2023-09-20T17:19:55Z")

</div>

That worked fine.

---

<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: [September 20, 2023, 6:52pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/4 "2023-09-20T18:52:22Z")

</div>

Okay so there’s not a problem with the way you set up or synced your Google Sheet.

The next steps would be to debug to figure out exactly where the problem is occurring. It could be how you’re setting the variable value for the row id (try a math block to set it to an integer instead) or an invalid property name (such as a column called “Answer1 “ with a space after it).

You can use my method of debugging if you like: [Debugging in Thunkable X (Video)](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471)

---

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [September 20, 2023, 8:51pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/5 "2023-09-20T20:51:33Z")

</div>

Ok,

I hard set the row id to 1 and it worked. I then remembered that some people spoke about an issue with initialising variables with a value, so I initialised to blank and set the variable to 1 when the Welcome Screen button is clicked.

Very weird that this would affect Google Sheets and not the Local Datasource.

---

<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: [September 20, 2023, 10:46pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/6 "2023-09-20T22:46:46Z")

</div>

I seem to remember a problem with using data source blocks with the variable `initialize` block. So it might not be reading the correct value for the `number of rows` block there.

@matt_conroy Can you confirm (or not) that that’s something to avoid?

---

<div class="post-metadata">

### Author: ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)
#### Post date: [September 21, 2023, 7:39pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/7 "2023-09-21T19:39:31Z")

</div>

Yes, try to avoid initializing variables with a data source. Instead, start them as a blank string or empty list and then go ahead and set them to the data source at the appropriate point. Great callout, @tatiang.

---

<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 20, 2023, 7:40pm UTC](https://community.thunkable.com/t/not-able-to-access-data-from-google-sheet-in-app/2605227/8 "2023-12-20T19:40:03Z")

</div>

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