# Removing element in a list without index

**URL:** https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272
**Category:** Questions about Thunkable X
**Created:** [January 6, 2021, 11:17am UTC](https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272 "2021-01-06T11:17:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lukas\_b\_98knm](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lukas\_b\_98knm](https://community.thunkable.com/u/lukas_b_98knm)
#### Post date: [January 6, 2021, 11:17am UTC](https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272/1 "2021-01-06T11:17:58Z")

</div>

Hi,

I would like to delete a value within a list if the user clicks on a component. However, I only find the block which allows for deletion based on index, not value. Is there a way to delete a value within a list based on searching for a string?

E.g. within the list “Interests”, there are “Sports”, “Music”, “Reading”. I do not know at which index those elements will be located. Hence, I need to search based on the string, not index.

Please let me know if you have any suggestions.

Thanks,  
Lukas

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [January 6, 2021, 11:34am UTC](https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272/2 "2021-01-06T11:34:59Z")

</div>

What if you had non-unique values in the list, would it delete all “Sports” or just the first occurrence of “Sports” that it finds?

There’s are also #Tutorials and DIY Guides about making a Search Bar in your app that you might find useful:

> [@Making a Search Bar](http://community.thunkable.com/t/making-a-search-bar/60939):
>
> Note: This tutorial was updated in June 2020 to reflect the new [when Text Input Changes](https://docs.thunkable.com/text-input#changes) block, which makes adding a search bar to your app much easier! This post will talk about creating a search bar for your app. Search Bars are great if you have a lot of text items or List Viewer options that you want to make available to the user without having a lot of items on the Screen at once. This post will describe how to make a search bar with a search button and a search bar that updates automatic…

---

<div class="post-metadata">

### Author: ![lukas\_b\_98knm](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lukas\_b\_98knm](https://community.thunkable.com/u/lukas_b_98knm)
#### Post date: [January 6, 2021, 2:33pm UTC](https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272/3 "2021-01-06T14:33:33Z")

</div>

All the values are unique, but what I am asking is how do I remove the unique value if I do not know the index? The # implies that I know the index of the value I want to delete, right? The issue is that I do not know the index, but rather just the value.

![Screenshot 2021-01-06 at 15.28.09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/b/2b82b68079fc810dfd1430369eb5f1edb4f2f35a.png)

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [January 6, 2021, 4:17pm UTC](https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272/4 "2021-01-06T16:17:43Z")

</div>

You could use the “find first occurrence in list” block @lukas_b_98knm

---

<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:31pm UTC](https://community.thunkable.com/t/removing-element-in-a-list-without-index/1042272/5 "2024-11-08T13:31:00Z")

</div>


