List - Unable to remove item

Hi

I am using a list to store values. When I am trying to remove an item from the list I get this error. I looked for options/solution on community, unable to find one while there are a few discussions.

Error:
Select list item: Attempt to get item number 0, of the list (). The minimum valid item number is 1.
Note: You will not see another error reported for 5 seconds.

Block I am using:
blocks (3)

It is clear with IF that it is able to find a match in the list and hence displaying Before removal debug statement - confirming that list length is not zero. And then the error comes and After removal statement is not shown.

What am I doing wrong?

IMG_20200702_001311

The blocks marked above are wrong. If you want to check if a particular thing is in the list or not, then you should use is in list? block from the list section of block editor :point_down:


https://docs.kodular.io/blocks/lists/#inlist

Also, are you sure the the error is due to the blocks that you have shown? Looking at the error message, it seems that the error occurs when you are try to select any list item. So may be error may be present where you are using select list item block (which is not present in the blocks provided).

3 Likes

Contain Text block is not wrong, it works perfectly. Remove list was giving error as I used list to csv on tinyDB as it was giving some error earlier. Once I removed list to csv and stored directly into FAVLIST, it worked fine.

Writing here to let you all know this was resolved.

No, the contain text block is not the perfect choice. Use what @Vaibhav told.

Please show all the block, because in this error, it told you that you are getting an item in a empty list. The computer would never be wrong.

#off-topic

:ok_hand:

Can u tell me in detail as i also want to know this

@Anil_Baheti was last seen in November here in the community
you might want to elaborate, so probably someone else is able to help…
see also

Taifun

please elaborate here List error removing item
Taifun
PS: I will close this rather old thread…