# \[Solved\] How to compare numeric text fields?

**URL:** https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720
**Category:** Questions about Thunkable X
**Tags:** solved
**Created:** [April 1, 2021, 4:07am UTC](https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720 "2021-04-01T04:07:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dro](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dro](https://community.thunkable.com/u/dro)
#### Post date: [April 1, 2021, 4:07am UTC](https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720/1 "2021-04-01T04:07:58Z")

</div>

![Screen Shot 2021-03-31 at 9.03.08 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/b/7bd4892868441307e37209e660aa5b980566f457.png) ![Screen Shot 2021-03-31 at 9.04.46 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f22e9591bda894d84cade9bc289b3b75eb3d7302.png)

Why is A NOT bigger than B and how should we code this to get the correct result?

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [April 1, 2021, 4:16am UTC](https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720/2 "2021-04-01T04:16:25Z")

</div>

Use a +0 block with both of the get texts. These blocks alone return text and we need them to be numbers in order to perform operations on them, and compare them.

---

<div class="post-metadata">

### Author: ![dro](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@dro](https://community.thunkable.com/u/dro)
#### Post date: [April 1, 2021, 4:21am UTC](https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720/3 "2021-04-01T04:21:12Z")

</div>

Thank you that worked.

---

<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 1, 2021, 6:22am UTC](https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720/4 "2021-04-01T06:22:24Z")

</div>

In case you’re curious, text gets alphabetized so while you might expect Apple to come before Banana and perhaps wouldn’t be surprised by Apple \< Banana , it seems strange that 12.00 \< 6.99. However, since the “number” you’re seeing is getting alphabetized, the first character of each text input is 1 vs. 6. And in fact 1 \< 6 so the full text “12.00” comes before “6.99”.

---

<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, 1:25pm UTC](https://community.thunkable.com/t/solved-how-to-compare-numeric-text-fields/1199720/5 "2024-11-08T13:25:36Z")

</div>


