# \[Solved\] Updating Label with Number

**URL:** <https://community.thunkable.com/t/solved-updating-label-with-number/3078673>\
**Category:** Questions about Thunkable X\
**Created:** [June 28, 2024, 2:14pm UTC](https://community.thunkable.com/t/solved-updating-label-with-number/3078673 "2024-06-28T14:14:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raviragas7y0ecx](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@raviragas7y0ecx](https://community.thunkable.com/u/raviragas7y0ecx)\
**Post date:** [June 28, 2024, 2:14pm UTC](https://community.thunkable.com/t/solved-updating-label-with-number/3078673/1 "2024-06-28T14:14:15Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/b/ab4c28a735358ef355952239e4b7040de9929dc8.png)

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.

 ![Image2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/757e3901332dc87b6bba28db50b8598a52c94be2.png)

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!

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [June 28, 2024, 3:18pm UTC](https://community.thunkable.com/t/solved-updating-label-with-number/3078673/2 "2024-06-28T15:18:18Z")

</div>

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](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/b/eb12d5ddd0c3f78c6da6584eb68daec49b3353ce.png)

---

<div class="post-metadata">

**Author:** ![raviragas7y0ecx](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@raviragas7y0ecx](https://community.thunkable.com/u/raviragas7y0ecx)\
**Post date:** [June 28, 2024, 9:34pm UTC](https://community.thunkable.com/t/solved-updating-label-with-number/3078673/3 "2024-06-28T21:34:28Z")

</div>

Dear @matt_conroy

Thanks for the tip!  
It works now!

Thank You!

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [July 1, 2024, 1:05pm UTC](https://community.thunkable.com/t/solved-updating-label-with-number/3078673/4 "2024-07-01T13:05:20Z")

</div>


