So “component” is the name of the button that was clicked. In your “when any button is clicked” block, you’ve said that component = component for both parts of that if statement. So you’re going to get ‘yes’ every time, because the first if is true, so it never gets to the else if.
Here’s one solution:
Read the /text/ on the button and use that to decide what they clicked. Here’s a simplified example:
- you could use some joins to make it do exactly what you wanted.
Some other thoughts:
Do you really want to do cloning in this case? You only have two buttons. If this is a simplified example of where a bunch of other different stuff is going to happen depending on which button was clicked, you might just want to have two separate "when button no clicked’ and ‘when button yes clicked’ blocks.
Do you really want to clone the label, as opposed to making a single label that you change the visibility and text of after clicking? It depends on what you’re doing, of course, but this strikes me as a complicated approach if the problem is not actually more complicated that what you’re presenting.