# Remove items from a list not based on their value

**URL:** <https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075>\
**Category:** Questions about Thunkable X\
**Created:** [November 5, 2020, 11:40pm UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075 "2020-11-05T23:40:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![oreeldadln](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/oreeldadln/32/89185_2.png) [@oreeldadln](https://community.thunkable.com/u/oreeldadln)\
**Post date:** [November 5, 2020, 11:40pm UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/1 "2020-11-05T23:40:24Z")

</div>

Hello,

Would love your help with a small issue.  
I’m trying to create a list with items but remove some of the items, not depend on their value but depend on their order.  
I want to remove all items from row X and above.

Does anyone know how to do it?

Thank you!

---

<div class="post-metadata">

**Author:** ![maurizio.polverini89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maurizio.polverini89/32/145191_2.png) [@maurizio.polverini89](https://community.thunkable.com/u/maurizio.polverini89)\
**Post date:** [November 5, 2020, 11:48pm UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/2 "2020-11-05T23:48:42Z")

</div>

If you see in List section there’s a block called:

in list-remove-# it might help.

Otherwise also in List section you can create a sub-list of items and just work with it.  
Don’t forget you can play with row’s lenght by using the block “list lenght”.

Hope it helped

---

<div class="post-metadata">

**Author:** ![oreeldadln](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/oreeldadln/32/89185_2.png) [@oreeldadln](https://community.thunkable.com/u/oreeldadln)\
**Post date:** [November 5, 2020, 11:50pm UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/3 "2020-11-05T23:50:01Z")

</div>

if i want to delete multiple items at once?  
3-14 what’s the smartest way?

---

<div class="post-metadata">

**Author:** ![maurizio.polverini89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maurizio.polverini89/32/145191_2.png) [@maurizio.polverini89](https://community.thunkable.com/u/maurizio.polverini89)\
**Post date:** [November 5, 2020, 11:55pm UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/4 "2020-11-05T23:55:22Z")

</div>

Show me your blocks, there are several smart ways to do it, but it depends on your blocks

---

<div class="post-metadata">

**Author:** ![oreeldadln](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/oreeldadln/32/89185_2.png) [@oreeldadln](https://community.thunkable.com/u/oreeldadln)\
**Post date:** [November 6, 2020, 12:00am UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/5 "2020-11-06T00:00:06Z")

</div>

![Screen Shot 2020-11-06 at 1.59.12](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/8/38098dc280a5c2097c5da37124d09ce1d4ab4936.png)

I tried something like that. but will do anything better 🙂

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [November 6, 2020, 12:16am UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/6 "2020-11-06T00:16:31Z")

</div>

i would create a list of indexes to be removed.  
reverse the list  
then loop that list and remove the item at that index from highest to lowest. doign it this way will retain the original index for each list item. to make it more understandable look at this list.

1,2,3,4,5,6,7

if i remove items 2-4 in a loop in order,

on loop 1, when removing item at index 2 im left with  
1,3,4,5,6,7

on loop 2 whhen removing item at index 3, im left with  
1,3,5,6,7

on loop 3 when removing item at index 4 im left wiith  
1,2,5,7

when removin them in reverse order, i get

1,2,3,4,5,6,7

1,2,3,5,6,7  
1,2,5,6,7  
1,5,6,7

 ![Screen Shot 2020-11-05 at 7.12.58 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/4/048f2df92317a45ac976978546b5b607a3e225f2.png)

---

<div class="post-metadata">

**Author:** ![oreeldadln](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/oreeldadln/32/89185_2.png) [@oreeldadln](https://community.thunkable.com/u/oreeldadln)\
**Post date:** [November 7, 2020, 10:08am UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/8 "2020-11-07T10:08:47Z")

</div>

It’s working! thank you so much!

---

<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, 12:21pm UTC](https://community.thunkable.com/t/remove-items-from-a-list-not-based-on-their-value/955075/9 "2024-11-08T12:21:45Z")

</div>


