How to send a component name by string or a variable

I have 11 labels named "bat1" to "bat 11" respectively.
The data to be displayed on these labels is stored in TinyDB.
It may happen that I wont have to display all 11 labels everytime. For that i created a while loop.
image

But I get this error

Is there a way out? Any extension?

This is a matter for lists and List Pickers. See this sample ...

Make a list of the "components"

image

The Label component 'name' is in the green Label1 blocks as shown in the List of button components

You need to have 11 items in your List.

Depending on how your 'text' is stored you might do something like this (fakeTinyDBCaptionList simulates your TinyDB List.

@TIMAI2 thank you for the idea!

I have stored my text in a list and am transporting via tinyDB.
I will retrieve data from the list itself.

Please see this
List_example.aia (5.2 KB)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.