# Compare number in list

**URL:** https://community.thunkable.com/t/compare-number-in-list/1467122
**Category:** Questions about Thunkable X
**Tags:** beginner, question
**Created:** [August 24, 2021, 4:39pm UTC](https://community.thunkable.com/t/compare-number-in-list/1467122 "2021-08-24T16:39:32Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)
#### Post date: [August 24, 2021, 4:39pm UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/1 "2021-08-24T16:39:32Z")

</div>

Hi All,

i want to compare number in list. if similar it will saying same number and if not, the number is available. below is the block and seem not reflect what i want.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/0/e0fd5059cbb56e2aafbc699b8fe6594279134647.png)

---

<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: [August 24, 2021, 4:50pm UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/2 "2021-08-24T16:50:41Z")

</div>

How can you compare text input to a list?

If you solve the above one then how can you compare a text to 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: [August 24, 2021, 4:59pm UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/3 "2021-08-24T16:59:21Z")

</div>

I think you want to use the `does list contain` block:

> **[Lists](https://docs.thunkable.com/lists#does-list-contains-item)**

But you also need to know that you can’t directly compare a text string to a number. For example, “40” does not equal 40. You need to convert one of them. One way to do this is to [add zero](https://community.thunkable.com/t/convert-text-input-to-int-how-to-make-numeric-input-that-can-be-used-for-math/921118/2) (0) to the text string. That converts it to a number and then you can directly compare that value to another number.

---

<div class="post-metadata">

### Author: ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)
#### Post date: [August 25, 2021, 1:04am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/4 "2021-08-25T01:04:21Z")

</div>

consider list enter by user and will add to list also. main point i dont want same number in a list.

---

<div class="post-metadata">

### Author: ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)
#### Post date: [August 25, 2021, 1:05am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/5 "2021-08-25T01:05:35Z")

</div>

i will try on this.

---

<div class="post-metadata">

### Author: ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)
#### Post date: [August 29, 2021, 3:08am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/6 "2021-08-29T03:08:01Z")

</div>

such as block working on standard list but when i change list to data source like airtable is not really work.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/3/536b43b48fee272afbdaed49137795784bc0aa04.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/4/e4b351d3ae7a764c363a279d72bc6582567f0bed.png)

---

<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: [August 29, 2021, 3:19am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/7 "2021-08-29T03:19:48Z")

</div>

Take out the list/gear block in the second screen shot. It’s causing a problem because the “list of values” block already creates a list. But you’re trying to create a list with a list inside it… that won’t work.

---

<div class="post-metadata">

### Author: ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)
#### Post date: [August 29, 2021, 6:52am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/8 "2021-08-29T06:52:51Z")

</div>

i have changed and not work with airtable or localdb.

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

---

<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: [August 29, 2021, 6:55am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/9 "2021-08-29T06:55:48Z")

</div>

In your IF condition you use `does list ((list2)) contains` and then you have `0 + Text_Input`. Use only `Text_Input` without adding 0.

---

<div class="post-metadata">

### Author: ![ozel1978](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@ozel1978](https://community.thunkable.com/u/ozel1978)
#### Post date: [August 29, 2021, 7:07am UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/10 "2021-08-29T07:07:59Z")

</div>

thank you muneer that worked.  
now i can go to next stage. hopefully your previous block about generate standard number will work with this block.

---

<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:17pm UTC](https://community.thunkable.com/t/compare-number-in-list/1467122/11 "2024-11-08T13:17:15Z")

</div>


