# How can i code a button that: when the button click it will open link form google sheet

**URL:** <https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316>\
**Category:** Questions about Thunkable X\
**Tags:** design, beginner, button\
**Created:** [October 9, 2021, 4:25pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316 "2021-10-09T16:25:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![trangiayen11bz4l2](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@trangiayen11bz4l2](https://community.thunkable.com/u/trangiayen11bz4l2)\
**Post date:** [October 9, 2021, 4:25pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/1 "2021-10-09T16:25:49Z")

</div>

when the button click it will open link form google sheet

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [October 9, 2021, 5:10pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/2 "2021-10-09T17:10:04Z")

</div>

Form or from?

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [October 9, 2021, 5:12pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/3 "2021-10-09T17:12:19Z")

</div>

If it is from, then you have to add the sheet to your data sources then go to blocks and bring when button click get value from the row then use the open block which could be found at the end of control then put the open block in when get is done ant set url to value. Put a label which can return error if there is

---

<div class="post-metadata">

**Author:** ![trangiayen11bz4l2](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@trangiayen11bz4l2](https://community.thunkable.com/u/trangiayen11bz4l2)\
**Post date:** [October 10, 2021, 12:29pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/4 "2021-10-10T12:29:55Z")

</div>

from google sheet 😃

---

<div class="post-metadata">

**Author:** ![trangiayen11bz4l2](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@trangiayen11bz4l2](https://community.thunkable.com/u/trangiayen11bz4l2)\
**Post date:** [October 10, 2021, 12:41pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/5 "2021-10-10T12:41:54Z")

</div>

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

is it like this ? i tried this but it dont work , can you show me your block setup please !

---

<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:** [October 10, 2021, 1:31pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/6 "2021-10-10T13:31:00Z")

</div>

If the column contains a valid URL then you only need to supply the row number  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/c/3c109e11890a521dad82e051176e8dc04c6579a9.png)

instead of **id** enter 1 or 2 or whatever the row number that has the URL.

---

<div class="post-metadata">

**Author:** ![trangiayen11bz4l2](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@trangiayen11bz4l2](https://community.thunkable.com/u/trangiayen11bz4l2)\
**Post date:** [October 10, 2021, 2:35pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/7 "2021-10-10T14:35:16Z")

</div>

Thank you , i did it  
😙

---

<div class="post-metadata">

**Author:** ![trangiayen11bz4l2](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@trangiayen11bz4l2](https://community.thunkable.com/u/trangiayen11bz4l2)\
**Post date:** [October 10, 2021, 2:36pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/8 "2021-10-10T14:36:29Z")

</div>

Thank you !

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [October 10, 2021, 5:05pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/9 "2021-10-10T17:05:46Z")

</div>

Welcome

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:14pm UTC](https://community.thunkable.com/t/how-can-i-code-a-button-that-when-the-button-click-it-will-open-link-form-google-sheet/1553316/10 "2024-11-08T13:14:50Z")

</div>


