# Google Sheet Data Update

**URL:** https://community.thunkable.com/t/google-sheet-data-update/3133161
**Category:** Web API's
**Tags:** beginner, help
**Created:** [August 9, 2024, 5:54am UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161 "2024-08-09T05:54:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![edagdemirkbzf](https://avatars.discourse-cdn.com/v4/letter/e/7993a0/32.png) [@edagdemirkbzf](https://community.thunkable.com/u/edagdemirkbzf)
#### Post date: [August 9, 2024, 5:54am UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161/1 "2024-08-09T05:54:44Z")

</div>

![sheet1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/4/74cb29fc050c2a2c308bf1485e409892ef3c6166.jpeg)  
 ![sheet2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/5896f7b5f4e4e997a069a41843a72b9fc3bcbe4d.jpeg)  
I have like this 2 google sheets. I added 2 butons in my app one of enter work and one of exit work. when a loged user click on enter button i can get datas from app on google sheet but i couldnt find way to when user clicked exit button get DateExit, TimeExit and LocationExit datas line of TurkishId. Someone can help me about this?

---

<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: [August 9, 2024, 7:39pm UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161/2 "2024-08-09T19:39:34Z")

</div>

Hope we can help here, I may not be fully understanding, however. The process for writing data to DateExit, TimeExit, and LocationExit would be the same as for DateEnter, TimeEnter, and LocationEnter but with the updated column for each and the row id.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/1/41a2d75c33d3c62d37bbc73006fcd09ac385ef2d.png)

---

<div class="post-metadata">

### Author: ![edagdemirkbzf](https://avatars.discourse-cdn.com/v4/letter/e/7993a0/32.png) [@edagdemirkbzf](https://community.thunkable.com/u/edagdemirkbzf)
#### Post date: [August 9, 2024, 8:20pm UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161/3 "2024-08-09T20:20:13Z")

</div>

Thank you for reply @matt_conroy .  
I changed my mind and now I’m creating a unique UserID for each user using the “random integer from 1 to 100” block in the math section, and I’m adding it to the first column in the “puantaj” sheet. When a user arrives at work in the morning, they press the entry button, and a unique UserID is created automaticaly in the timesheet. My problem is that when the user leaves in the evening and presses the exit button, I need to retrieve the exit data and put it into the relevant columns of the row corresponding to this unique UserID. However, I haven’t been able to achieve this.

---

<div class="post-metadata">

### Author: ![Machinimush](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Machinimush](https://community.thunkable.com/u/Machinimush)
#### Post date: [August 12, 2024, 12:45pm UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161/4 "2024-08-12T12:45:19Z")

</div>

My first idea would be to try using a Stored Variable for this. Assign the UserID to a stored variable when the UserID gets created. Then, when they press the exit button, you can use the UserID text to find the corresponding row number in the Google Sheet. Once you know the row ID, it should be simple to use the update value block to update the columns.  
Because it’s a Stored Variable, the UserID should be saved in between user sessions on the app.

Someone posted a method to find the row number based on the contents of a known column recently, check out: [How to get data for an individual user from a google sheet? - #4 by jakecohen120rpcjvw](https://community.thunkable.com/t/how-to-get-data-for-an-individual-user-from-a-google-sheet/3135139/4) - the latest reply has a Youtube tutorial

Mind you, this only works if the UserID is a unique value. I’m not sure how your app would be used exactly, but a random number between 1 and 100 can run into issues. Perhaps you could use the ‘Seconds since 1970’ block to assing a UserID instead? This block is in the Device category.

---

<div class="post-metadata">

### Author: ![edagdemirkbzf](https://avatars.discourse-cdn.com/v4/letter/e/7993a0/32.png) [@edagdemirkbzf](https://community.thunkable.com/u/edagdemirkbzf)
#### Post date: [August 12, 2024, 12:57pm UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161/5 "2024-08-12T12:57:46Z")

</div>

Hello @Machinimush!  
I used 1 and 1000000000 and used join in text and added with “-” users id number. So hard to people get same number for UserID. Actualy UserID using for that not right. we can say UUID for it. I already solved that problem in my app. when user created UUID(UserID) ive save that UUID in phone store database. When user clicked exit button call for row id from phone store database. Thank you for reply  
Best wishes

---

<div class="post-metadata">

### Author: ![dorismccoy356ls4va9](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dorismccoy356ls4va9](https://community.thunkable.com/u/dorismccoy356ls4va9)
#### Post date: [September 17, 2024, 1:07pm UTC](https://community.thunkable.com/t/google-sheet-data-update/3133161/6 "2024-09-17T13:07:14Z")

</div>

> [@Machinimush](#):
>
> My first idea would be to try using a Stored Variable for this. Assign the UserID to a stored variable when the UserID gets created. Then, when they press the exit button, you can use the UserID text to find the corresponding row number in the Google Sheet. Once you know the row ID, it should be simple to use the update value block to update the columns.  
> Because it’s a Stored Variable, the UserID should be saved in between user sessions on the app.
> 
> > **.**
> >
> > Thanks for sharing this information with us. I appreciate you. I also would like to help you by sharing the [Write My Thesis for Me - Your Personal Thesis Expert 24/7](https://academized.com/write-my-thesis) website with you where you will find an essay writer who will write your thesis assignments. I have shared that specific website with you because Academized provides academic support through custom essays, research papers, and editing services. It aims to offer high-quality, original content crafted by professional writers, catering to students’ specific requirements for various assignments.
> 
> Someone posted a method to find the row number based on the contents of a known column recently, check out: [How to get data for an individual user from a google sheet? - #4 by jakecohen120rpcjvw](https://community.thunkable.com/t/how-to-get-data-for-an-individual-user-from-a-google-sheet/3135139/4) - the latest reply has a Youtube tutorial
> 
> Mind you, this only works if the UserID is a unique value. I’m not sure how your app would be used exactly, but a random number between 1 and 100 can run into issues. Perhaps you could use the ‘Seconds since 1970’ block to assing a UserID instead? This block is in the Device category.

Thanks for answering, I appreciate you.
