Any Button Click

Hello,
loading Airtable data, I store an external web link. How to I pass this information to “Any Button” component? (to replace the default values with mine).

Thanks
Andrea

Maybe change it from any button to when button one or whatever button number

Sorry I don’t understand; could you give me an example?
The problem is that I have the list with values and I know the button UniqueID … but how I match them?

Maybe change the languege?Also maybe change the letter

Hi @Andrea_Marchisio,

have a look at my github issue #295 how to get the index of a clicked “any button”. With the index you can fetch the URL from the list “Articoli_link” and open this URL in “open link”.

Hello,

Your question looks like you were the first to reach the finish line, but you don’t know how to cross it to win over the blocks.

In your blocks, you assign a Button.BackgroundPicure = URL

Now you need to take the URL FROM the “get any button BackgroundPicure” component in “Any Button Click” and the problem is solved.

Ciao,
good idea to pass info to Any Button but I have to do another action: the information I have to pass is not a property of a button but a variable information (app Articoli_Link) that contain an external website URL.
In other words any button has to link me to different external web site … I stored that info into Airtable and then into variable list “app Articoli_Link”.
So the problem is to pair the ID button I pressed to ID of my variable list …

So save the ID in the Button property.BackgroundPicture through the symbol # from the URL. Then in the event handler make a list with a # separator and get the ID and URL:

Button.BackgroundPicture = ID#URL

Button Click{
    get list from text with #
    ID = get 1 from list
    URL = get 2 from list
}
1 Like

I am studying it, it is quite clear to me but I have just a few questions about the IDs of the objects.
Does every object have an ID? right? a row, a column, a button, a label a text input etc etc.
So if I’m cloning a row, the ID that I get from “clone” is the one relative to the row and not the objects contained in it, right?
I think this is so, because if I compare the “clone” IDs with the “component” IDs they are different.
So how do I exactly get the IDs of the individual buttons created/cloned?

When you clone or create objects, their IDs are placed in the list of components of the given type in the parent container. If the parent container is Row1, the button clones will be placed in the list, which you can get using the “all Buttons in Row1” block.

But you can do without this if you create your own ID, for example, in the Button property.BackgroundPicture you write “id1”. In the Any Button Click block, you get a component using the “component” block and see its Button property.BackgroundPicture

Good idea but my background Pictures are dynamic and I cannot change them.
I made some tests and I understood that when I clone an object (row, button, column etc) I can obtain, from “clone” during the loop, just the ID of the object cloned and not the sub-object also cloned.

In my case I clone a row that contain a button; “clone” contain ID of rows and not the ID of the buttons.
That’s why I can’t find a match when I use “Any Button” - “Component”

You are right that when you clone a container, you can get the container’s identifier, but I don’t understand why you have problems determining which button inside the container was clicked. See my example.

https://x.thunkable.com/projects/5eddde43c6189c2253051801/project/properties/designer/

Hello @actech,
sorry for the late but I work on it a few days … the system to get the buttom IDs works fine (Any Button) but now mixed yor example I try to show you the issue that I said.
The block turns 10 times it’s true and you see 10 buttons on the screen but:

  1. I named the buttons cloned (just to assign a text label)
  2. you will see that 9 buttons will have the text label and the 10th no
  3. “remove button” has nothing to do with it (just remove the button on the top)

So really you have 10 buttons but just 9 has modified and cloned as I wanted.

Check this. The problem is that block syncing failed in the last update, making it impossible to use Thunkable X. Using a delay block is not the solution to this big problem.

https://x.thunkable.com/projects/5eddde43c6189c2253051801/project/properties/designer/

tried … no delay doesn’t fix the problem. So I wait next update.

Thanks
Andrea