# \[Bug\] Label.Text only allows text constants, but any variable types (WAS: Can't directly display math constants)

**URL:** <https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677>\
**Category:** Questions about Thunkable X\
**Created:** [May 19, 2017, 5:09pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677 "2017-05-19T17:09:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BillG](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@BillG](https://community.thunkable.com/u/BillG)\
**Post date:** [May 19, 2017, 5:09pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/1 "2017-05-19T17:09:08Z")

</div>

Hi All,

(Edit: Some corrections later in thread. Thanks!)

Don’t seem to be able to directly display math constants (can’t coerce to text type?). The following won’t connect:

![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/2X/6/606ed939cb57864bc2d48494e2cd9a9df5af8c05.png)

A workaround is to add intermediate variable, then to display the variable:

![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/2X/0/00c4a423efa3aba0b231bbddc24eea3ab55ac84d.png)

Results in:

1.618033988749895

Thanks!  
BillG

---

<div class="post-metadata">

**Author:** ![pavi2410](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pavi2410/32/16588_2.png) [@pavi2410](https://community.thunkable.com/u/pavi2410)\
**Post date:** [May 19, 2017, 5:22pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/2 "2017-05-19T17:22:08Z")

</div>

Because Label1.Text expects a String value.

---

<div class="post-metadata">

**Author:** ![ts02](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ts02/32/2013_2.png) [@ts02](https://community.thunkable.com/u/ts02)\
**Post date:** [May 19, 2017, 5:24pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/3 "2017-05-19T17:24:08Z")

</div>

@pavi2410 That’s not true. Labels can display integers, and all types of text values.

---

<div class="post-metadata">

**Author:** ![pavi2410](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pavi2410/32/16588_2.png) [@pavi2410](https://community.thunkable.com/u/pavi2410)\
**Post date:** [May 19, 2017, 5:25pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/4 "2017-05-19T17:25:08Z")

</div>

If it can accept integers, but this constant is not integer, but a float or double (in java, or maybe in language used for iOS)

---

<div class="post-metadata">

**Author:** ![BillG](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@BillG](https://community.thunkable.com/u/BillG)\
**Post date:** [May 19, 2017, 5:43pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/5 "2017-05-19T17:43:42Z")

</div>

Hi All,

I tried some other experiments, and found that Label.Text only seems to like constant text values, but allows variables of any type. It doesn’t like constant numbers and constant lists (but those are allowed in Thunkable Android). IMHO, Label.Text should be able to coerce (almost) any type to its text type.

Thanks!  
BillG

---

<div class="post-metadata">

**Author:** ![albert](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/albert/32/4077_2.png) [@albert](https://community.thunkable.com/u/albert)\
**Post date:** [May 19, 2017, 5:55pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/6 "2017-05-19T17:55:56Z")

</div>

Thanks for figuring this out for us. I’ll add it to the documentation!

---

<div class="post-metadata">

**Author:** ![eps\_pasteur](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eps_pasteur/32/3594_2.png) [@eps\_pasteur](https://community.thunkable.com/u/eps_pasteur)\
**Post date:** [May 21, 2017, 5:16am UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/7 "2017-05-21T05:16:17Z")

</div>

Un compteur avec bouton + et - avec l’impossibilité de descendre en dessous de zéro avec un bouton de remise à zéro s’écrit donc comme ça?

 ![](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/2X/c/c8ccfd81eded6ced469c3f423e659859c9bcbef8.jpg)

---

<div class="post-metadata">

**Author:** ![BillG](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@BillG](https://community.thunkable.com/u/BillG)\
**Post date:** [June 5, 2017, 6:13pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/8 "2017-06-05T18:13:42Z")

</div>

> [@albert](#):
>
> Thanks for figuring this out for us. I’ll add it to the documentation!

Hi @albert, @thunkable,

Just a double-check: IMHO, I would consider this broken (a bug), not a documentation problem. The Label.Text block should be able to coerce any type to a text (string) type. Note that this works properly in Android Thunkable.

Thanks!  
BillG

---

<div class="post-metadata">

**Author:** ![albert](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/albert/32/4077_2.png) [@albert](https://community.thunkable.com/u/albert)\
**Post date:** [June 5, 2017, 8:40pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/9 "2017-06-05T20:40:45Z")

</div>

Got it – just added this to our queue as well.

Thanks!  
Albert

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:06pm UTC](https://community.thunkable.com/t/bug-label-text-only-allows-text-constants-but-any-variable-types-was-cant-directly-display-math-constants/3677/10 "2024-11-08T12:06:36Z")

</div>


