[Solved] Updating Label with Number

I am having an issue that I can’t seem to explain and resolve.
I have a label that is to display a random number from 0 to 9.
When I store the number in a variable and try to update the label,
it doesn’t work. The value shown is always 0.

When I directly generate the random number and assign it to the label block, then it
works correctly with a random number displayed with each call.

Can someone explain why I am observing this and how to make the first method work?
I want it to work as such so that I can use the variable data for subsequent activities.

Thanks!

Hi @raviragas7y0ecx, the issue here is the set app variable block–that one is meant for dynamically named variables or just by typing the name of the variable. It can run into issues when you use this block and just add another variable block into it.

Instead, just grab the set variable cNum1 block. This works every time.
Screenshot 2024-06-28 at 11.15.42 AM

Dear @matt_conroy

Thanks for the tip!
It works now!

Thank You!

1 Like