# How do I get up-to-date/live data from Google Sheets?

**URL:** <https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128>\
**Category:** Questions about Thunkable X\
**Tags:** google-sheets\
**Created:** [April 3, 2022, 9:00pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128 "2022-04-03T21:00:51Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [April 3, 2022, 9:00pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/1 "2022-04-03T21:00:51Z")

</div>

I’m struggling to finish my jokes app for WDC #27. I can’t consistently get the Google Sheets blocks to work.

When I click the Like button, what should happen is that it should get the current value from the likes column for that row id and then add one to it and display both the original value and new value.

But instead, it updates the cell value (e.g. from 0 to 1) but when displaying the two values in the Source label, it shows “0 =? 0”. The two `get value` blocks are copies of each other so they should get the value 0 at first and then the value 1.

I’ve tested this in Preview, in Thunkable Live and as a downloaded app on an iPhone 11. The two custom functions just show/hide labels and get Sheets values. They don’t _set_ any variable or Sheets values.

Here’s a screenshot:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/6/26f80c3ceb1f7e6f1072a9610b746a75e70137dd.png)

---

<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:** [April 4, 2022, 12:11am UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/2 "2022-04-04T00:11:20Z")

</div>

Bug reported here:

> <https://github.com/thunkable/thunkable-issues/issues/1138>
>
> \### Platform
> Drag and Drop UI - web?
> Drag and Drop UI - iOS?
> 
> \### Steps to R…eproduce
> 1. Click the "Get & update values" button to get and display a value from a Google Sheet cell (e.g. 4), and update the value by one (e.g. 4+1).
> 3. Wait a few seconds (or more) and click the "Get new value" button.
> 
> \### Expected Behavior
> I would expect the second time the value is displayed that it includes the added value (e.g. 5).
> 
> \### Actual Behavior
> The second time the value is displayed, it shows the original value (e.g. 4).
> 
> \### Project Link
> https://x.thunkable.com/copy/1feeef38c13e4150815598a95155e283
> 
> \###Community Link
> https://community.thunkable.com/t/cant-get-value-from-google-sheets/1816128
> 
> \`\`\`
> STACK TRACE AND/OR SCREENSHOTS
> \`\`\`

---

<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:** [April 4, 2022, 12:18pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/3 "2022-04-04T12:18:08Z")

</div>

I always face issues with `Get Value` block. It reads from cache and therefore will not see the update unless you close the app and open it again.

I use `Get Row Object` instead.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/60945768b7544d9b3443b9eede0559ced041fa9f.png)

---

<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:** [April 4, 2022, 4:43pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/4 "2022-04-04T16:43:37Z")

</div>

Thanks, @muneer, I’ll try that instead.

This isn’t directed at you but… I really wish Thunkable would disable blocks in the interface if they don’t work properly. I spent so much time troubleshooting this thinking I had done something wrong.

---

<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:** [April 4, 2022, 7:34pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/5 "2022-04-04T19:34:27Z")

</div>

> [@tatiang](#):
>
> I really wish Thunkable would disable blocks in the interface if they don’t work properly

That would be a good way and saves a lot of efforts. In some circumstances I doubted my codes and thought I am doing a mistake that I can’t see just to discover that it is purely a malfunction of the block itself.

---

<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:** [April 4, 2022, 9:05pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/6 "2022-04-04T21:05:10Z")

</div>

Hey @tatiang ,

I responded in Github but wanted to follow up here too. I have raised this as a bug internally and we will follow up when we have more details. Thank you for bringing this up and your above suggestions. They will be taken in to consideration for future updates. 🙂

---

<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:** [April 5, 2022, 4:37am UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/7 "2022-04-05T04:37:56Z")

</div>

Turns out it’s also not updating the values when I use the `get row object` block. ☹

---

<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:** [April 5, 2022, 8:02am UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/8 "2022-04-05T08:02:21Z")

</div>

> [@tatiang](#):
>
> also not updating the values

I just made a quick test and it worked for me

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

This is the output

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/5/156615248bcbf1d3368c36fac8812ac5735ad5b5.png)

---

<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:** [April 5, 2022, 3:42pm UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/9 "2022-04-05T15:42:47Z")

</div>

It looks like the issue is not limited to Google Sheets. The Get Value block is also not working with Airtable in the DnD interface.

---

<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:** [April 6, 2022, 6:47am UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/10 "2022-04-06T06:47:27Z")

</div>

> [@tatiang](#):
>
> not limited to Google Sheets.

Yes, the block itself retrieves data from cache instead of actual table.

---

<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:** [July 5, 2022, 6:47am UTC](https://community.thunkable.com/t/how-do-i-get-up-to-date-live-data-from-google-sheets/1816128/11 "2022-07-05T06:47:38Z")

</div>

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