# Error with "in list find first occurrence of" block

**URL:** https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827
**Category:** Questions about Thunkable X
**Tags:** list
**Created:** [February 7, 2025, 3:17pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827 "2025-02-07T15:17:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![grant.mccallum](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/grant.mccallum/32/210541_2.png) [@grant.mccallum](https://community.thunkable.com/u/grant.mccallum)
#### Post date: [February 7, 2025, 3:17pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827/1 "2025-02-07T15:17:47Z")

</div>

Today I have encountered one of the most frustrating errors yet…

I have isolated the error to the below code blocks:

 ![FindBugBlocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b7953f466146d68ae96c86388b91f511ef39909.png)

This should look for the integer “56400” in a list, if it finds it, it should call out the position of that number in that list.

Expected result: My debug label should read something like “56400 - 107881, 73000, 56400, , , , - 3”

Instead I get this:

 ![share_1191267850023827805](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/1/418282e7cbb5698e3a27a6534005bdeb2f098f94.png)

Despite 56400 being RIGHT THERE in the list, it cannot seem to find it.

I’ve been grappling with this all morning. I tried to recreate it in another app and it worked perfectly so I really hope I have just done something stupid here and someone will (gently) point this out to me!

---

<div class="post-metadata">

### Author: ![brianl](https://avatars.discourse-cdn.com/v4/letter/b/f14d63/32.png) [@brianl](https://community.thunkable.com/u/brianl)
#### Post date: [February 7, 2025, 8:42pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827/2 "2025-02-07T20:42:36Z")

</div>

The first entry looks like it is “56400 - 107881”, not “56400”. It has to be a perfect match.

---

<div class="post-metadata">

### Author: ![grant.mccallum](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/grant.mccallum/32/210541_2.png) [@grant.mccallum](https://community.thunkable.com/u/grant.mccallum)
#### Post date: [February 7, 2025, 9:10pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827/3 "2025-02-07T21:10:41Z")

</div>

Hi Briani, thanks for the response. The first entry is in fact “56400” - look at the blocks.

The reason for the " - " is that I have set the label to display the entry it is searching for followed by the " - ", followed by the list, followed by the number of ties it has found that entry.

---

<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: [February 7, 2025, 10:01pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827/4 "2025-02-07T22:01:41Z")

</div>

You’re right. You need to compare text to text. You’re comparing a number to a text string. Join the 56400 number to an empty string (“”) to convert it to a text string when assigning it to the variable. Even though it makes sense to our brains, 56400 ≠ “56400”.

---

<div class="post-metadata">

### Author: ![grant.mccallum](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/grant.mccallum/32/210541_2.png) [@grant.mccallum](https://community.thunkable.com/u/grant.mccallum)
#### Post date: [February 7, 2025, 11:57pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827/5 "2025-02-07T23:57:43Z")

</div>

This worked, thanks tatiang!

---

<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: [May 8, 2025, 11:58pm UTC](https://community.thunkable.com/t/error-with-in-list-find-first-occurrence-of-block/3547827/6 "2025-05-08T23:58:12Z")

</div>

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