# Guide for checking if text is number

**URL:** <https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590>\
**Category:** Tutorials and DIY Guides\
**Tags:** community, math, text, tips\
**Created:** [November 18, 2020, 5:37am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590 "2020-11-18T05:37:48Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 18, 2020, 5:37am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/1 "2020-11-18T05:37:48Z")

</div>

### A guide to check if it is number or not

### Try This-

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/39888e8ddc905bfbd3c703d926aeca873e5a7163.png)

### Now working with no error!

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 18, 2020, 5:39am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/2 "2020-11-18T05:39:41Z")

</div>

please tell if this guide was helpful!

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [November 18, 2020, 6:07am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/4 "2020-11-18T06:07:56Z")

</div>

very helpful  
take this  
🎉

i guess the topic name isnot suitable

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 18, 2020, 6:16am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/5 "2020-11-18T06:16:18Z")

</div>

thank you for comment @eko.devs.apploroceo

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 18, 2020, 6:38am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/6 "2020-11-18T06:38:58Z")

</div>

Interesting approach. Here’s what I’d do to determine if a value is a number:

 ![Screen Shot 2020-11-17 at 10.38.28 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/a/6a01aa9c8156a136993affafadf69de095021706.png)

If you multiply a text string by zero you’ll get NaN or possibly null. If you multiply any number by zero, you’ll get zero.

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 18, 2020, 6:42am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/7 "2020-11-18T06:42:30Z")

</div>

this is also a good way to check if is number in less blocks  
nice @tatiang

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 18, 2020, 7:07am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/8 "2020-11-18T07:07:22Z")

</div>

Thanks. One drawback of your approach is that I’m pretty sure if the last character in the text string is a number, it will evaluate the entire string as a number. So these would all be numbers:

4  
29  
heythere29  
M8

You’d need a variable that counts the number of found numeric digits/characters and then compares that to the length of the string.

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 18, 2020, 10:04am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/11 "2020-11-18T10:04:21Z")

</div>

ok thanks

i have updated the image now its working

now working with no error!

---

<div class="post-metadata">

**Author:** ![eko.devs.apploroceo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eko.devs.apploroceo/32/93147_2.png) [@eko.devs.apploroceo](https://community.thunkable.com/u/eko.devs.apploroceo)\
**Post date:** [November 19, 2020, 3:18am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/12 "2020-11-19T03:18:37Z")

</div>

now topic seems ok

---

<div class="post-metadata">

**Author:** ![vanilla0bean](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/vanilla0bean/32/89368_2.png) [@vanilla0bean](https://community.thunkable.com/u/vanilla0bean)\
**Post date:** [November 19, 2020, 7:27am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/13 "2020-11-19T07:27:32Z")

</div>

Thanks :\>

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 19, 2020, 7:48am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/14 "2020-11-19T07:48:52Z")

</div>

your welcome @vanilla0bean  
glad you liked it

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 20, 2020, 8:13pm UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/15 "2020-11-20T20:13:36Z")

</div>

Is 123.786 a number?  
Is -67 a number?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 20, 2020, 8:47pm UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/16 "2020-11-20T20:47:39Z")

</div>

> [@drted](#):
>
> Is 123.786 a number?  
> Is -67 a number?

You and your outliers! 😆

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 20, 2020, 8:52pm UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/17 "2020-11-20T20:52:57Z")

</div>

Me and my maps!

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [November 21, 2020, 6:36am UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/18 "2020-11-21T06:36:07Z")

</div>

if you want to add . and -  
just add it in the list of numbers

---

<div class="post-metadata">

**Author:** ![lewws66](https://avatars.discourse-cdn.com/v4/letter/l/9de053/32.png) [@lewws66](https://community.thunkable.com/u/lewws66)\
**Post date:** [March 20, 2023, 4:55pm UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/19 "2023-03-20T16:55:28Z")

</div>

![check if Text_input is number or contains letters of the alphabet](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/a/9aade281b8f75a04f64ab2d4f80155d6427fc366.jpeg)

I used this logical check : If (Text\_input + 0 not equals to Text\_input) then Alert message "input is not a number

---

<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:21pm UTC](https://community.thunkable.com/t/guide-for-checking-if-text-is-number/981590/21 "2024-11-08T12:21:33Z")

</div>


