# How to use "if any text input is a number" inside "if any button clicked"

**URL:** <https://community.thunkable.com/t/how-to-use-if-any-text-input-is-a-number-inside-if-any-button-clicked/1832710>\
**Category:** Questions about Thunkable X\
**Created:** [April 14, 2022, 10:12am UTC](https://community.thunkable.com/t/how-to-use-if-any-text-input-is-a-number-inside-if-any-button-clicked/1832710 "2022-04-14T10:12:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandygargdqs](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sandygargdqs/32/122194_2.png) [@sandygargdqs](https://community.thunkable.com/u/sandygargdqs)\
**Post date:** [April 14, 2022, 10:12am UTC](https://community.thunkable.com/t/how-to-use-if-any-text-input-is-a-number-inside-if-any-button-clicked/1832710/1 "2022-04-14T10:12:26Z")

</div>

there are multiple text input boxes and multiple buttons on a screen for a Calculator app.  
Using the “Any Component” block how can I check that whenever a button is clicked all the text\_input boxes are non-empty and numbers(not text)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [April 14, 2022, 10:19am UTC](https://community.thunkable.com/t/how-to-use-if-any-text-input-is-a-number-inside-if-any-button-clicked/1832710/2 "2022-04-14T10:19:44Z")

</div>

Welcome to Thunkable.

If you add **0** to the content of the `Input Text` you will get a **NaN** error if the text content is not a number. You could make use of this condition to validate the content as numbers.

---

<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:** [April 14, 2022, 8:32pm UTC](https://community.thunkable.com/t/how-to-use-if-any-text-input-is-a-number-inside-if-any-button-clicked/1832710/3 "2022-04-14T20:32:02Z")

</div>

Is there a reason you’re using text input instead of static button text (0-9, +, -, etc.) for your calculator entry?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 13, 2022, 8:32pm UTC](https://community.thunkable.com/t/how-to-use-if-any-text-input-is-a-number-inside-if-any-button-clicked/1832710/4 "2022-07-13T20:32:41Z")

</div>

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