# Google Sheet Row Id changes every time

**URL:** <https://community.thunkable.com/t/google-sheet-row-id-changes-every-time/2743030>\
**Category:** Questions about Thunkable X\
**Created:** [December 8, 2023, 7:51am UTC](https://community.thunkable.com/t/google-sheet-row-id-changes-every-time/2743030 "2023-12-08T07:51:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![minamaestro2023kg](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@minamaestro2023kg](https://community.thunkable.com/u/minamaestro2023kg)\
**Post date:** [December 8, 2023, 7:51am UTC](https://community.thunkable.com/t/google-sheet-row-id-changes-every-time/2743030/1 "2023-12-08T07:51:06Z")

</div>

Hi  
I’m using the current blocks to update some cells in a single row for each user in Google Sheets.

 ![Screenshot 2023-12-08 090422](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/b/db8c3e3d90f29ee4c1637f94abf432d46facd340.png)  
And for the row ID I’m using the current blocks to get the row ID.  
 ![Screenshot 2023-12-08 095003](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/4/54d906f801d9af88dfe916cb67ebc5d42a1d96e7.png)  
The problem I’m facing is that the blocks sometimes work fine and update the desired row , but at other times it updates the wrong row like updating the header.

---

<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:** [December 8, 2023, 7:55am UTC](https://community.thunkable.com/t/google-sheet-row-id-changes-every-time/2743030/2 "2023-12-08T07:55:12Z")

</div>

This is a problem:

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

The `set app variable` block is going to trigger before the new row is created in your data source. It needs to be in the “do” section so that it happens _after_ the row is created.

---

<div class="post-metadata">

**Author:** ![minamaestro2023kg](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@minamaestro2023kg](https://community.thunkable.com/u/minamaestro2023kg)\
**Post date:** [December 8, 2023, 8:20am UTC](https://community.thunkable.com/t/google-sheet-row-id-changes-every-time/2743030/3 "2023-12-08T08:20:25Z")

</div>

@tatiang  
this makes life better, but in case the variable PharmacyName is changed , it updates again the header instead of creating a new row

---

<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:** [March 7, 2024, 8:20am UTC](https://community.thunkable.com/t/google-sheet-row-id-changes-every-time/2743030/4 "2024-03-07T08:20:28Z")

</div>

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