# Clone a Row in a column

**URL:** https://community.thunkable.com/t/clone-a-row-in-a-column/1294066
**Category:** Questions about Thunkable X
**Tags:** clone
**Created:** [May 19, 2021, 2:35pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066 "2021-05-19T14:35:04Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 19, 2021, 2:35pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/1 "2021-05-19T14:35:04Z")

</div>

In a column block, I have a row with a label and a button.  
I would like to clone this row to have 5 row in my column where each label have an incremental text.  
To do so I do this:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/8/d8ff4a8c7addfd967725ce14a2adf782348e956a.png)

But it doesn’t sound good to me 'cause there’s no referencing to the cloned row’s label.  
Indded, I obtain this.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/f/2f500c5fec7c5826c89df54887fc1e1306918ba4.png)  
As you can see, I don’t have 1,2,3,4 and 5 but 5,1,2,3 and 4.  
I’m looking for something like “in cloned row” set etichetta’s text to XXXXXX" But I can’t find it.  
Can somone help me?  
Thank you

---

<div class="post-metadata">

### Author: ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)
#### Post date: [May 19, 2021, 2:42pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/2 "2021-05-19T14:42:29Z")

</div>

Hi!

Create a Label in the Row you created by using this block. After this, you can set the Label’s text:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/a/fa036a2133d948dafc08175bd80b94c7605dc221.png)

If you accept a piece of advice I prefer using [Custom Data Viewer](https://docs.thunkable.com/custom-data-viewer-layout).

---

<div class="post-metadata">

### Author: ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)
#### Post date: [May 19, 2021, 2:49pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/3 "2021-05-19T14:49:12Z")

</div>

Eticetta refers specifically to the ORIGINAL label. If you want to change a label in the clone, you’ll need to get it’s ID, using something like

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/e/2ee7f7eef05e582b59eaa357a1cdaf1aacdbf460.png)  
I’m getting the first (probably only) label in the new cloned row, and setting it’s text. You’ll find the blocks you need the the same drawer as the clone block.

---

<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 19, 2021, 2:51pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/4 "2021-05-19T14:51:05Z")

</div>

Here’s how I do this after cloning a column containing a row with a button in it:

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

I’m looping through Firebase nodes but you could just replace the “for each j in list” with a counting loop instead.

The key – as I see @catsarisky just posted above – is to use the “all label in” block in the Any Components drawer and then to specify the # (order) of the label within the row. Is it the first label, the second label, etc.? The loop count variable I’m using just cycles through all rows in the column.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 19, 2021, 3:07pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/5 "2021-05-19T15:07:00Z")

</div>

I’ve tried this way, but i Get all labels text to Manutenzione\_1

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

---

<div class="post-metadata">

### Author: ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)
#### Post date: [May 19, 2021, 3:10pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/6 "2021-05-19T15:10:43Z")

</div>

Interesting. Just for a moment, try adding a 1 second delay before the set label blocks, and see if the behavior changes?

---

<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 19, 2021, 3:33pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/7 "2021-05-19T15:33:10Z")

</div>

I didn’t show you the bottom of my loop block but I always add a “wait 0 seconds” block within the loop. I’m not sure why it makes a difference but it does.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 20, 2021, 6:04am UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/9 "2021-05-20T06:04:28Z")

</div>

Thank you both @tatiang and @catsarisky a wait block is what I needed. And 0 seconds solve the problem…Could it be a Live testing or preview problem or it happen even in app?  
I’m opening an issue for that in github.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 20, 2021, 6:14am UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/10 "2021-05-20T06:14:22Z")

</div>

If interested in, I’ve created a Bug issue:

> <https://github.com/thunkable/thunkable-issues/issues/915>
>
> In ThunkableX I'm using a count block to clone a row and change label text for e…ach clone incrementing a number at the end of the label.
> 
> In live testing and preview, the name of the labels is still the same of the parent If I don't insert a wait for 0 sec inside the loop.
> 
> To reproduce it:
> 1. Create a Button and a column, inside the column place a row and inside the row place a label with text Manutenzione\_1.
> 2. Run this code:
> !\[image\](https://user-images.githubusercontent.com/52273816/118927899-c04a3180-b942-11eb-87f0-90c27713e26c.png)
> 
> The result will be 5 labels in column, all with "Manutenzione\_1" as text
> 3. If you run this code, with a 0 seconds wait block, instead:
> !\[image\](https://user-images.githubusercontent.com/52273816/118928069-fe475580-b942-11eb-9d86-673eecd69dd0.png)
> 
> The result will be 5 labels in column with "Manutenzione\_1", "Manutenzione\_2","Manutenzione\_3" and so on as text, as expected.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 21, 2021, 12:49pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/11 "2021-05-21T12:49:10Z")

</div>

What If I need to remove every clone?  
Is there a way to do it?

---

<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 21, 2021, 1:07pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/12 "2021-05-21T13:07:15Z")

</div>

If you are cloning everything in a specific **column** then just remove that column  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/39554ec63a61e1ecbcf73cf6225d0afe5d52c240.png)

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 21, 2021, 1:29pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/13 "2021-05-21T13:29:41Z")

</div>

At the moment I have a column with 1 element and every time I press a button I have to clone that element several times.  
The problem it that an the next time i press th button, I have to delete previous clones and create the new ones, so the column and the original one, should stay there

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 21, 2021, 1:30pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/14 "2021-05-21T13:30:58Z")

</div>

I would use custom data viewer if it worked ☹ But we are still waiting for the fix.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 21, 2021, 2:05pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/15 "2021-05-21T14:05:28Z")

</div>

I solved this way.  
Other solutions are welcome 😉

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/453c6bc4cdeba7f716fc16d07cc2a13951b10aa6.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 21, 2021, 2:11pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/16 "2021-05-21T14:11:58Z")

</div>

I will use a more controlled way.

In the start of the app, I will use a variable to store the row ID for the row I want to keep  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/f/dfde57d4feda21ca8d1130e77d2a8acf2925fd3d.png)

Then whenever I want to remove other rows I would do:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/0/40cd763b24d8b2a07cc58fab25d566c3d43712a4.png)

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [May 21, 2021, 2:14pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/17 "2021-05-21T14:14:35Z")

</div>

Does it store the ID of the row or it’s characteristics? 'Cause I change components text even in the original row.

---

<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 21, 2021, 2:18pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/18 "2021-05-21T14:18:06Z")

</div>

This will store the component ID. You will find it in the `Any component` drawer.

If you use the one in the component drawer then you will get the content only.

---

<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:22pm UTC](https://community.thunkable.com/t/clone-a-row-in-a-column/1294066/19 "2024-11-08T13:22:23Z")

</div>


