# HELP with: \[in list() find first/last occurence of item()\]

**URL:** <https://community.thunkable.com/t/help-with-in-list-find-first-last-occurence-of-item/629390>\
**Category:** Questions about Thunkable X\
**Created:** [June 22, 2020, 1:39am UTC](https://community.thunkable.com/t/help-with-in-list-find-first-last-occurence-of-item/629390 "2020-06-22T01:39:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddie.rebehy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eddie.rebehy/32/67993_2.png) [@eddie.rebehy](https://community.thunkable.com/u/eddie.rebehy)\
**Post date:** [June 22, 2020, 1:39am UTC](https://community.thunkable.com/t/help-with-in-list-find-first-last-occurence-of-item/629390/1 "2020-06-22T01:39:43Z")

</div>

Hi Thunkers,

I am experiencing an anomaly. Unless I am losing my mind, I am certain I have this working in other parts of my app but I cant get it to work anymore:

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

Returns 1.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/c/dc9e6f9debc3d9a5f025e78e94c83b7daba85fad.png)

Returns 0

EDIT: I have looked back into most of my previous applications using this block and it looks like I have indeed searched for the entire string in a list to return an index.  
Is there any way to search as a sub-string within the list items to return the index? Thanks in advance.

---

<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:** [June 22, 2020, 5:01am UTC](https://community.thunkable.com/t/help-with-in-list-find-first-last-occurence-of-item/629390/2 "2020-06-22T05:01:56Z")

</div>

That looks like the expected behavior for those blocks.

To search for a sub-string within a list item, you’d need to loop through the list items and check each one using this Text block:

![Screen Shot 2020-06-21 at 10.00.36 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/9/a9ef5dfeb61c08c6177f20891d3eb2254955fb0d.png)

---

<div class="post-metadata">

**Author:** ![eddie.rebehy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eddie.rebehy/32/67993_2.png) [@eddie.rebehy](https://community.thunkable.com/u/eddie.rebehy)\
**Post date:** [June 22, 2020, 5:25am UTC](https://community.thunkable.com/t/help-with-in-list-find-first-last-occurence-of-item/629390/3 "2020-06-22T05:25:08Z")

</div>

Thank you @tatiang .

I have already used this method using sub-string but needed confirmation that the find in list block was acting correctly. Thanks again for your insight and timely response to my query.

---

<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:25am UTC](https://community.thunkable.com/t/help-with-in-list-find-first-last-occurence-of-item/629390/4 "2024-11-08T11:25:34Z")

</div>


