# Return a value from a specific Google Sheet cell

**URL:** <https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [March 6, 2022, 2:48pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781 "2022-03-06T14:48:08Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [March 11, 2022, 12:32pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781/21 "2022-03-11T12:32:52Z")

</div>

Hi @muneer, I figured it out. See below:

 ![HexScnSearchSolution](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4db1e8d74e69ab8dfc418f85f9cbf0382d685e13.png)

I found a “ **Refresh Data** ” function block in the " **Any Component** section on the blocks page.

Many thanks once again for your invaluable assistance!

Andos.

---

<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 11, 2022, 12:50pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781/22 "2022-03-11T12:50:59Z")

</div>

There is a `refresh` block in the drawer of the Data Viewer List block. You can use it just after the update block. No need to use the `Any Component` option.

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [March 11, 2022, 2:34pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781/23 "2022-03-11T14:34:04Z")

</div>

Ok thanks @muneer!

I have just found another little problem wish I am currently trying to resolve. Although the search/ result function is resolved. I had noticed that everytime the " **HexScreen"** loads using the “Live Test”. I am always presented with the result of the last search before the Hexscreen was closed. (see below)

 ![HexOpenedScreen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/e/2ee2b3920ed9067e335ac0cbe010f674b23f7e65.png)

![HexGSheetPreviousSearch](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/4/947587156a517eed42cb35c3539deff77c7775b8.png)

I am now trying to find a way fix this. I have trying to use the “ **Set HexDVL visible to false** ” in the “when the screen opens” block. Which does sort of work but I am now looking at maybe trying things another way because when I re-open the HexScreen the HexDVL is now longer visible but the previous search still populates the "HexText\_Input box.

**My Blocks**

 ![HexBlocksTrial-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/d/3d93b21ff0444060151b443ac6e7fb0c448c9d15.png)

What I am now looking for is a way to set an “Enter” button which when clicked during a Search returns the Country from the GSheet’s “value” column. That part I have achieved. (image below)

![HexCorrectSearch-Screenshot 2022-03-11 14.19.02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/5/358689724d884430399b3fff306e23d724f218c6.png)

Once the result has displayed in the **HexDVL** , I wish for the text of the **“Enter” to change to “Clear”.** (See images below):

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

![HexClearBtn-Screenshot 2022-03-11 14.25.24](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a612d2dc1543fa5df141ef48d2334649337cb4d5.png)

When the “ **Clear** ” button is clicked, it will delete the **Searched for** hexcode from cell A2 in the Source GSheet. This in turn will return a blank result in the **HexDVL**. Which means that HexScreen will always be empty (see below). When the user opens the HexScreen.

 ![HexCleanScreen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/1/e137d0eed6c85120c576a4c152da991c11504101.png)

Also, is there a way to set up the Back Button ( **HexBackBtn** ) to also delete the delete the **Searched for** hexcode from cell A2 in the Source GSheet when it clicked?

This is in case the user does not use the **Clear** button after using the screen.

Many thanks,

Andos.

---

<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 11, 2022, 4:06pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781/24 "2022-03-11T16:06:18Z")

</div>

You could just make the row in the DVL hide when the `Search Input Text` is cleared. This will save you a lot of efforts.

One thing  
This does not work and you can safely delete it.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/b/7beec9f990d4de8ad01e6fca8c1c7b0bdc2461a6.png)

This code will not set the text in the DVL.

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [March 11, 2022, 7:31pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781/25 "2022-03-11T19:31:15Z")

</div>

Hi @muneer, for some reason, when I remove “ **set HexDVL’s HexDVLCountryLabel** ” block, the **Search stops working**. So I put it back.

I have re-applied the “ **visible= false/ true** ” blocks and omitted the “ **Clear button** ” idea and it all seems to be working fine now.

Here are my blocks:

 ![Final Hex Solution-Screenshot 2022-03-11 19.25.48](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/b/bb17532223055b97e06c1601d0d6a5f367e3ffb0.png)

A thousand thank you’s, for your assistance.

Andos.

---

<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 9, 2022, 7:31pm UTC](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781/26 "2022-06-09T19:31:23Z")

</div>

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

[Previous page](https://community.thunkable.com/t/return-a-value-from-a-specific-google-sheet-cell/1769781.md?page=1)
