# \[Solved\] Greater than and less than is not working

**URL:** <https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988>\
**Category:** Questions about Thunkable X\
**Tags:** solved, beginner\
**Created:** [December 12, 2019, 2:13pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988 "2019-12-12T14:13:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)\
**Post date:** [December 12, 2019, 2:13pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/1 "2019-12-12T14:13:52Z")

</div>

Im trying to detect **insuffiecent balance** which doing a mathematical operation for two numbers, the available balance and the amount to spend… still not, even im trying vice versa, swithing each one of another dont work from me uisng the blocks in the logic section which has greater and less than… Please do share some tips and recommendation

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [December 12, 2019, 2:14pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/2 "2019-12-12T14:14:55Z")

</div>

Hi there,

Can we see the blocks you have been using?

---

<div class="post-metadata">

**Author:** ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)\
**Post date:** [December 12, 2019, 4:16pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/3 "2019-12-12T16:16:03Z")

</div>

Hi, thank u for attention. I cant send a image of blocks right now since its was my bedtime im using mobile. But what i used is basic blocks using **if then** and from logic section **less than blocks** and use 2 label which i thunk with than obtaining some number on it.  
Please do share some example at your very convienient time, i will appreciate it so much… so you can try also if its working in your own method. Thank you

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [December 12, 2019, 4:48pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/4 "2019-12-12T16:48:44Z")

</div>

I just built a little [test app](https://x.thunkable.com/projectPage/5df26d1cc1ba090d6fb98eda/) and the comparison blocks seem to be working for me!  
If you reply to this topic tomorrow, we can talk about using these blocks. We will probably need to ask each other some questions!

---

<div class="post-metadata">

**Author:** ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)\
**Post date:** [December 13, 2019, 2:26am UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/5 "2019-12-13T02:26:43Z")

</div>

![s](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/608ec92d6f81f35a3f8bc7dff7360e1e543da1ad.png) here… the **pointssendbox** is the textbox for sharing/sending points while the **valuasce label** is the available points in users account… i tried to test this one blocks is working but im wonder when i have e.g sample: 100 points balance and i want to share 50 points, its still say insufficient balance, but when is type exact 100 its sending… so strange, i double check everything and come with my best until i dont find better answer why, and hope to share it here

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 13, 2019, 7:43am UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/6 "2019-12-13T07:43:54Z")

</div>

The problem is that you are comparing strings, not numbers, with each other. To convert string numbers to numbers, use the addition block with 0.

if \<- ( from pointsendbox get Text + 0 ) \< ( from valusace get Text + 0 )

---

<div class="post-metadata">

**Author:** ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)\
**Post date:** [December 13, 2019, 11:33am UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/7 "2019-12-13T11:33:16Z")

</div>

how can i convert label/text to a numbers?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 13, 2019, 12:13pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/8 "2019-12-13T12:13:00Z")

</div>

![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/c/cc7b6ec11b0b6a59a08d5d8532704da82402a644.png) to  
if ← ( from pointsendbox get Text + 0 ) \< ( from valusace get Text + 0 )

---

<div class="post-metadata">

**Author:** ![DevilLooper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/devillooper/32/53854_2.png) [@DevilLooper](https://community.thunkable.com/u/DevilLooper)\
**Post date:** [December 13, 2019, 12:46pm UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/9 "2019-12-13T12:46:41Z")

</div>

ok i will try this and get back here for the result

---

<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, 11:46am UTC](https://community.thunkable.com/t/solved-greater-than-and-less-than-is-not-working/363988/10 "2024-11-08T11:46:24Z")

</div>


