# Search local DB / get row Id

**URL:** <https://community.thunkable.com/t/search-local-db-get-row-id/1043514>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [January 10, 2021, 10:03am UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514 "2021-01-10T10:03:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [January 10, 2021, 10:03am UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514/1 "2021-01-10T10:03:03Z")

</div>

Hey Guys,  
I find the documentation of the localDB to be very short and missing essential info.

So what Iam trying to do seems easy but Iam stuck.  
I have a simple local Database. In there are two columns “name” “objectId”.  
I show a list of the names in a listviewer. Now, when someone clicks an item I need to know and store the “objectId” of this item. Thought this would be easy but I have not found a way to do it yet.

Any ideas?

---

<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:** [January 10, 2021, 11:08am UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514/2 "2021-01-10T11:08:07Z")

</div>

There is more than one way of doing it.

One way is to have two lists, one list for “name” and another list for “objectId”.

In your list viewer you show the name list and when the user select a name use the [item click] even and use the green block [index] to read the item in the “objectId” list using the index which should return to you the relevant data.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [January 10, 2021, 11:28am UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514/3 "2021-01-10T11:28:42Z")

</div>

That seems doable. Thanks. But iam wondering. why have a database at all if you can not get items directly by querying?

---

<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:** [January 10, 2021, 11:33am UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514/4 "2021-01-10T11:33:49Z")

</div>

Use data viewer list to connect directly to your table.

The other advantage of data viewer list is the display of more than one field in each row.

---

<div class="post-metadata">

**Author:** ![tmurachpx](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@tmurachpx](https://community.thunkable.com/u/tmurachpx)\
**Post date:** [January 10, 2021, 11:35am UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514/5 "2021-01-10T11:35:54Z")

</div>

ah! That is a superb solution. Thank you Sir!

---

<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:30pm UTC](https://community.thunkable.com/t/search-local-db-get-row-id/1043514/6 "2024-11-08T13:30:54Z")

</div>


