# \[Solved\] How to find which item in the list was clicked on (how do I find the position of an element in a list/array)

**URL:** https://community.thunkable.com/t/solved-how-to-find-which-item-in-the-list-was-clicked-on-how-do-i-find-the-position-of-an-element-in-a-list-array/1808622
**Category:** Questions about Thunkable X
**Tags:** solved
**Created:** [March 29, 2022, 11:03pm UTC](https://community.thunkable.com/t/solved-how-to-find-which-item-in-the-list-was-clicked-on-how-do-i-find-the-position-of-an-element-in-a-list-array/1808622 "2022-03-29T23:03:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rohithmadhuker8d](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rohithmadhuker8d](https://community.thunkable.com/u/rohithmadhuker8d)
#### Post date: [March 29, 2022, 11:03pm UTC](https://community.thunkable.com/t/solved-how-to-find-which-item-in-the-list-was-clicked-on-how-do-i-find-the-position-of-an-element-in-a-list-array/1808622/1 "2022-03-29T23:03:54Z")

</div>

So basically I am on one screen which has a list with post titles, and I want to click on an element in the list which will redirect me to a new page. That new page should have the Post title and Post description corresponding to the item I clicked on which are all stored on Firebase. My question is how to find which item was clicked on?

For example… Lets say a list had titles of:

Post1  
Post2  
Post3

and then I click on Post 2. The description of Post 2 is “this is post 2”  
I want the new screen to show the Title as Post 2 and description as “this is post 2”.

Same for Post3 or Post1 if i click on that

---

<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: [March 30, 2022, 1:24am UTC](https://community.thunkable.com/t/solved-how-to-find-which-item-in-the-list-was-clicked-on-how-do-i-find-the-position-of-an-element-in-a-list-array/1808622/2 "2022-03-30T01:24:38Z")

</div>

If you are using a list viewer, the “item click” event block for the list viewer has two green blocks: item and index. The item is the text of the item the user clicked. The index is the row number of the item the user clicked.

You can use the index value to get the other data from Firebase.

---

<div class="post-metadata">

### Author: ![rohithmadhuker8d](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rohithmadhuker8d](https://community.thunkable.com/u/rohithmadhuker8d)
#### Post date: [March 30, 2022, 7:16pm UTC](https://community.thunkable.com/t/solved-how-to-find-which-item-in-the-list-was-clicked-on-how-do-i-find-the-position-of-an-element-in-a-list-array/1808622/3 "2022-03-30T19:16:49Z")

</div>

Thanks!

---

<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: [June 28, 2022, 7:17pm UTC](https://community.thunkable.com/t/solved-how-to-find-which-item-in-the-list-was-clicked-on-how-do-i-find-the-position-of-an-element-in-a-list-array/1808622/4 "2022-06-28T19:17:00Z")

</div>

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