Bug or bad code? Can't display the length of a variable

Hi all,

I am trying to generate a random number and display this number in a label.

In the length label below, I would like to display the length of the randomly generated number from the variable.

Screen:

Blocks:

Link: Project Link

The text in my “Length” label remains blank when I start this app and will not display the length of the variable string.

Strangely, this works fine if I make it read the length from the label rather than the variable but this won’t work for my purposes.

All help appreciated!

Hi,

Since an integer is technically a number, Thunkable needs it to be converted to text first become you can get the length.

There are various ways, but I just tried this and it works.

2023-12-31 10 36 56

1 Like

Thanks Steve, this is really helpful

1 Like

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