(Solved) Cloned element does not also clone the blocks of the original for all clones but just for the last one

Hey all

I would like to discuss this with you before opening a bug report as I am not sure whether what I am seeing can be considered as expected behaviour or not.

(updated description)
So as of recently we can clone elements such as buttons using the “Any Component > Clone” functionality which is really useful however, it appears that this only clones the design of an element but not any blocks associated with it. For example, let’s say that you have a button with a telephone number as its “Text” property which when clicked, launches the phone’s dialler and pre-populates the number in the dialler’s number field. So far, so good.

Now, if you clone that button 10 times, the first 9 clones loose the described functionality as the block associated to the original button does not get cloned for them but it does for the last clone. For the first 9 clones, only the original’s design gets cloned.

@Mark can you help us understand if this is expected behaviour?

Thanks
K

Hey there,


Can this help u :

Hey kartik14.

Is this for Thunkable X or Classic? Not sure I can find the “do something with component” block on X. Also, I just realised that that I described does work but only for the last clone of the original. So let’s say you clone a button 10 times, only the 10th clone will also get the the blocks of the original working.

Thanks
k

image

This is what you need to do =)
Rename the “x” to “component” =)

You need to put actions on clones for them to have a function, but generally this funtion is pretty much the same in all of them.

1 Like

Hey Yukold

I can’t use the “Any button” as shown on kartik14’s response; let me explain why. I am cloning a column which has two buttons in it. One button launches Google Maps and the other launches the dialler so two different actions. If I understand correctly, the function points to all buttons but executes one action so that would not be suitable for what I am doing.

Also, based on my update, the blocks of the original actually do get cloned as well but only work for the last clone so for example if I clone a button 10 times, the blocks of the original will work on the last but not the 9 first so this looks like a bug to me.

Thanks
K

I already went through this, you must put the invisible cloned object (set false) there in the design and in the blocks you put visible, as in the example below:

image

about the button, do the example below :wink:

If more than one button:

remembering that these are just examples to help you, you will have to make your way to getting the best possible for what you wish, good luck :wink:

Any questions just ask! we will be happy to help you

3 Likes

@Deluxe, The explanations and solutions that @Yukold and @kartik14 are proposing are the right sort of ideas for how to do what you want.

There shouldn’t be any new blocks created when you clone a component. If you are seeing such behavior, please post a copy/share link to simple example project where that occurs.

-Mark

2 Likes

So I ended up implementing this a bit differently and it works like a charm! Thank you all!!

1 Like