# Getting parent component via Any componenet

**URL:** https://community.thunkable.com/t/getting-parent-component-via-any-componenet/667539
**Category:** Questions about Thunkable X
**Created:** [July 9, 2020, 1:51pm UTC](https://community.thunkable.com/t/getting-parent-component-via-any-componenet/667539 "2020-07-09T13:51:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![adminyi7yav](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@adminyi7yav](https://community.thunkable.com/u/adminyi7yav)
#### Post date: [July 9, 2020, 1:51pm UTC](https://community.thunkable.com/t/getting-parent-component-via-any-componenet/667539/1 "2020-07-09T13:51:24Z")

</div>

I am trying to create clones of a row which has 2 images and a label. How do I get all the components of a particular row once an image within a row is clicked. Here is a code that I have written so far. In Javascript, I would do something like document.getElementById("").parentElement

 ![Screenshot 2020-07-09 at 7.19.44 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/f/ef2885fa50f32a6e5f13c87318e79a1a85abe2aa.png)

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [July 13, 2020, 2:36pm UTC](https://community.thunkable.com/t/getting-parent-component-via-any-componenet/667539/2 "2020-07-13T14:36:12Z")

</div>

Sorry @adminyi7yav - still not fully following this.

You have a pair of images in a row,  
You clone the entire row.  
When an image is clicked you want to know what row it belongs to?

Is that correct? If so, I think you’ll have to the math for this one (it’s just dividing by 2, so should be pretty straightforward) as I can’t think of a function that will do this out-of-the-box.

Let me know whether or not that makes sense.

Thanks.

---

<div class="post-metadata">

### Author: ![adminyi7yav](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@adminyi7yav](https://community.thunkable.com/u/adminyi7yav)
#### Post date: [July 14, 2020, 12:30pm UTC](https://community.thunkable.com/t/getting-parent-component-via-any-componenet/667539/3 "2020-07-14T12:30:57Z")

</div>

So if I understand this right, if there are 100 clones of that row, and if I what to which row was clicked based on the image that was clicked, I divide it by 2?

---

<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, 11:24am UTC](https://community.thunkable.com/t/getting-parent-component-via-any-componenet/667539/4 "2024-11-08T11:24:14Z")

</div>


