# \[Solved\] What are the IDs in a Google Sheets Data Source?

**URL:** <https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999>\
**Category:** Questions about Thunkable X\
**Tags:** data-source, google-sheets\
**Created:** [May 4, 2022, 6:35am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999 "2022-05-04T06:35:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 4, 2022, 6:35am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/1 "2022-05-04T06:35:32Z")

</div>

Hi! I have a google sheets data source linked to my project, which has 3800 rows. I have the UserID of my user, and I want to get the google sheets row ID associated to the row containing the user’s UserID.

I used the below blocks to achieve as I said above, but it outputs ‘undefined’ instead of giving me the google sheet rowID.

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

Later after debugging I found out that this block -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/6/966af11b10c97fd8b38fe3a6832e2919c1b71448.png)

outputs `100`. As the database has 3800 rows, the number of row IDs (i.e. length of above list) should be 3800, right? Why does it stop at 100?

BTW, this is not the same for any other column; like this block -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/a/4aa3de7113d3d440ae75fb2ea4f5c10f8a0651de.png) outputs `3800`, which is correct.

* * *

What should I do now?

Also, if I try to get a sample id of any row, it returns something like this - **`20e6f8c9-2378-4ebd-a985-fe3f7549282b`**. What are these IDs? Is it possible to get these IDs in a cell for every row in google sheets? _(like in airtable, to get the recordID of any record, you get a formula column and enter RECORD\_ID() to get the id for every row.)_

---

<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:** [May 4, 2022, 7:09am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/2 "2022-05-04T07:09:29Z")

</div>

There does seem to be a bug with the `list of values in ... ID` block. When I check the length of that list for a Google Sheet with 140 rows, it returns 9. If I check the length of another column, it returns 140. It also returns 140 if I use the `number of rows` block.

Row IDs are long, unique strings. I think they are generated by Thunkable but it’s possible they are generated by Google Sheets.

Have you tried just using integer values for the row IDs? And/or using the `find first occurrence of item` block to determine which row a certain search term (userID) is in?

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

In this case, “user BCB” was in row 138 and the label displayed 138.

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 4, 2022, 7:11am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/3 "2022-05-04T07:11:51Z")

</div>

You mean a custom rowID? Like it is a custom created column.

---

<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:** [May 4, 2022, 7:12am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/4 "2022-05-04T07:12:58Z")

</div>

No. I just mean that you can use either the actual row ID such as **`20e6f8c9-2378-4ebd-a985-fe3f7549282b`** or you can use the row # such as 1523. If you get the value of row ID 1523, you’ll get the value of the cell in row #1523.

---

<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:** [May 4, 2022, 7:14am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/5 "2022-05-04T07:14:02Z")

</div>

In other words, once you have the `first occurrence` of a value, that **is** the row ID. You don’t need to do anything else to find the row ID. Just use that value.

 ![Screen Shot 2022-05-04 at 12.14.33 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/9/69533b41fa535682890b9e698a97a9ca462e8368.png)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 4, 2022, 7:15am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/6 "2022-05-04T07:15:07Z")

</div>

Actually I need the row ID to update the row with some value - so I’d required this kind of row id **`20e6f8c9-2378-4ebd-a985-fe3f7549282b`**

I am trying to use this update block -

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/8/c8e49fcd6b748f42d00fc8fa35bb7bffa949c862.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:** [May 4, 2022, 7:16am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/7 "2022-05-04T07:16:29Z")

</div>

Does it make sense that I’m saying you can replace “id” with a number? If you want to update row 16, just put 16 in for the row id.

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 4, 2022, 7:17am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/8 "2022-05-04T07:17:11Z")

</div>

Does the block work with the row number too? I’ve never tried it

---

<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:** [May 4, 2022, 7:18am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/9 "2022-05-04T07:18:04Z")

</div>

That’s what I’m saying… yes!

You can do stuff like this:

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

That will find the user ID “user BCB” and change the score in that same row to 250:

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

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 4, 2022, 7:19am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/10 "2022-05-04T07:19:13Z")

</div>

Ohhhh 😅 Let me just try it with the row number - hold on.

* * *

**Update:** Yessss! It works perfectly now 🤩 As always, you’re the best!

---

<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:** [August 2, 2022, 7:19am UTC](https://community.thunkable.com/t/solved-what-are-the-ids-in-a-google-sheets-data-source/1860999/11 "2022-08-02T07:19:47Z")

</div>

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