How do I access the name of a component?

Hello and welcome!

You are correct that tags are the way to go here.

You can set tags in the IDE manually (although I rarely do that), but you can also set the tags by setting data bindings accordingly. By “data binding” I mean that you can connect variables or data from DataTables to your tag property. Please see the introductory tutorials or search the docs for more information.

All this said, I usually set tags in code. So, if I have to give some identification to a set of components when the app starts up, I’ll set all their tags in the init function. You can see some discussion and tips about using tags here. It has been discussed a few times on the forum so you could give that a search as well.

Anvil relies in part on the Skulpt project and from what I have read, not being able to access the actual name of a component has to do with current limitations in Skulpt.

3 Likes