# Getting the row selected from data view

**URL:** <https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065>\
**Category:** Questions about Thunkable X\
**Created:** [May 8, 2023, 8:19am UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065 "2023-05-08T08:19:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![atownsley1](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@atownsley1](https://community.thunkable.com/u/atownsley1)\
**Post date:** [May 8, 2023, 8:19am UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/1 "2023-05-08T08:19:51Z")

</div>

To get the value for the row chosen from a dataview i di what as i get the rowId which is a long string  
I cant seem to get the row value to check in a if condition of which i need to do more statements but this doesnt work.

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

---

<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:** [May 8, 2023, 6:39pm UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/2 "2023-05-08T18:39:56Z")

</div>

The green block `row ID` corresponds to the column **ID** in the table. This is a hidden column and you can use it to retrieve data directly from the table or do other checks.

---

<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 8, 2023, 9:07pm UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/3 "2023-05-08T21:07:17Z")

</div>

The row number is something the Data Viewer event blocks should have.

Please add a comment to this feature request: [Data Viewer List click event blocks should include rowNum · Issue #1179 · thunkable/thunkable-issues · GitHub](https://github.com/thunkable/thunkable-issues/issues/1179)

---

<div class="post-metadata">

**Author:** ![atownsley1](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@atownsley1](https://community.thunkable.com/u/atownsley1)\
**Post date:** [May 8, 2023, 11:13pm UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/4 "2023-05-08T23:13:48Z")

</div>

Well i cant work this out sorry as my code gets an undefined message on Label 3 but label2 works fine. How do i access a row value and store in a variable?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/c/3cf7c5f8819697389598ed832951b33349c406b6.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 9, 2023, 1:46am UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/5 "2023-05-09T01:46:33Z")

</div>

If you store the green `row id` block in a variable, you need to use that variable again for the row id in each `get value` block.

Also, avoid doing this:

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

Because you’re telling Thunkable to set an app variable called [the value of app variable “xx”] to a value. I think you meant to set the value of `app variable xx`. There’s already a block for that in the Variables drawer. You don’t need to use the `set app variable` block that has an empty string " ". But if you do want to use that, just type in xx where you have `app variable "xx"`.

Use this block:

 ![Screenshot 2023-05-08 at 6.51.44 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d0cbb187ae0ed63c652b6c991cfbbc322039fb7.png)

Instead of this one:

 ![Screenshot 2023-05-08 at 6.51.50 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/4/941ad44e665fa02c7fe70faef4b1b0405bcd7e44.png)

---

<div class="post-metadata">

**Author:** ![atownsley1](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@atownsley1](https://community.thunkable.com/u/atownsley1)\
**Post date:** [May 9, 2023, 1:55am UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/6 "2023-05-09T01:55:14Z")

</div>

yes that worked. thanks i didnt pick this up

---

<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 7, 2023, 1:56am UTC](https://community.thunkable.com/t/getting-the-row-selected-from-data-view/2408065/7 "2023-08-07T01:56:11Z")

</div>

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