# Is bigger than not working

**URL:** <https://community.thunkable.com/t/is-bigger-than-not-working/1124187>\
**Category:** Questions about Thunkable X\
**Created:** [February 25, 2021, 10:10am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187 "2021-02-25T10:10:46Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [February 25, 2021, 10:10am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/1 "2021-02-25T10:10:46Z")

</div>

I’m making an app which includes badges. There are 3 variable lists, UNLOCKED BADGES, NAMES OF THE BADGES, and CALORIES REQUIRED. Related data is kept at the same list-item-number. That means that The WATERCRESS badge is not earned(false), and requires 50 calories. Likewise, the Fitness badge is also not earned, and requires 100 calories.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/3/43b650b70e99e26b448ad68207831472985d1675.png)  
Now, these are app variables, so they are reset every session. That’s why all the UNLOCKED BADGES are false. I keep track of the user’s calories in a DVL-connected table, and I want to compare each calorie number to the required number of calories and and then assign true to each badge depending on if the calorie numbers meets the criteria.  
All the buttons are disabled, and I want to make each unlocked badge enabled and also show an unlocked image at the bottom. But when I test my app, I get the TEMPTATION badge(which is correct), and the WATERCRESS badge which is worth 50 calories, which isn’t correct(that means that so far none of my calorie numbers have been equal to/less than 50). I’ve looked over my code a lot of times, but I don’t see anything that’s causing the enabling of the WATERCRESS badge.  
Here’s my screen:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/d/5dbf917a74deec7276f990317430375157250ee9.png)

And my code:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/d/bd2e339cf7a43fcfbc336436effb2d41871631b9.png) (this is put in a when screen opens block)  
and the rest:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0e0c6a7a0a71fbf419175d264a9b30efd2abc274.png)  
The naming is all correct. The names of each badge-button is

- Watercress badge
- Fitness badge
- Healthy badge
- Temptation badge.  
Since these are my badge names  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/505acf2c2dc34f5ee69e2d9ced863c377c6ce385.png)  
that is correct, as well as the images. The other badges which should be disabled are staying disabled, yet the WATERCRESS badge is disabled. This is on Legacy UI. This is my end result:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/0847ab9a67dddd9ce68974d153b6e006ab088c79.png) and this is on computer live test(no emulator or anything). What is happening?

---

<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:** [February 25, 2021, 10:29am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/2 "2021-02-25T10:29:26Z")

</div>

Yes, the app is behaving as expected.

You are storing calories required as `text` which makes ‘5’ greater than ‘3’ and get activated.

**[Suggestion]**  
Can you change ‘50’ in the list to ‘050’ and run your app and see the output.

---

<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:** [February 25, 2021, 10:52am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/3 "2021-02-25T10:52:34Z")

</div>

@muneer You are a genius! This worked beautifully! Thank you so much… You solved that seemingly complex problem in a single post!

---

<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:** [February 25, 2021, 11:01am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/4 "2021-02-25T11:01:50Z")

</div>

Thank you for the exceptional praise.

---

<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:** [February 25, 2021, 11:04am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/5 "2021-02-25T11:04:55Z")

</div>

There seems to be another problem, though. I have a calorie-number that’s smaller than 50(11 calories), but still the WATERCRESS badge is remaining locked. Is the 050 affecting it, and what can I do to change it?

---

<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:** [February 25, 2021, 11:14am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/6 "2021-02-25T11:14:02Z")

</div>

I haven’t noticed it in the code. Anyway, all your numbers should be 3-digit with leading zeros if required. So “11” should be stored as “011”

In the other hand, you can redo you list as numbers instead of text  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/77a0d21a56631eb9dae50e6504a964c8ce51e88e.png)  
And make sure you are storing the calories in your table as numbers too so you can compare like to like.

---

<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:** [February 25, 2021, 11:17am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/7 "2021-02-25T11:17:58Z")

</div>

Sure, thanks, will do that. If I redo it as numbers, then can I change 50 from 050 to 50?

---

<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:** [February 25, 2021, 11:20am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/8 "2021-02-25T11:20:39Z")

</div>

When you write the values as numbers, the system will ignore the leading zeros even when typed.

---

<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:** [February 25, 2021, 11:23am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/9 "2021-02-25T11:23:18Z")

</div>

OK, thank you so much! It works perfectly now.

---

<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:** [February 25, 2021, 11:28am UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/10 "2021-02-25T11:28:40Z")

</div>

Welcome the same much dear.

---

<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:29pm UTC](https://community.thunkable.com/t/is-bigger-than-not-working/1124187/11 "2024-11-08T13:29:09Z")

</div>


