What does "Delete Item from list" do?

Hello,

I do not quite understand what "Delete item from list" does.
Provided , I have list with 30 item, what happens with the flowing 29 items?
Is Item 2 before delete than item 1 after delete and the number of entries is 29 ?

Can anybody advice , please?

Yes; if you delete the first item in a list; then the item, which was at index 2 is now at index 1 and the length of the list is now 29

Taifun

Are you asking what happens if you use the remove list item block (highlighted in yellow)?

All the List Blocks you can use for LISTS are in the MIT App Inventor List Blocks documentation.

Why not make yourself a simple Project creating a List of 5 or so items, then use the remove list item block on the third index item.. What happens? When you DELETE an Item, you must specify the index of the item you want to delete.

Thanks for your answers.

I already use list-blocks, but the reason I'm asking is , the result is not as expected.

@SteveJG The documentation you mentioned is not sufficient , at least for me.

I would like to display a chart from list. If the list has reached the maximum number of
entries, I would like to shift the chart to the left. For that I use "remove list item " block
for the oldest item, enter the newest value to top the list and try to display the chart.
Until the list is not full, everything is working correctly, but shift chart to left doesn't work.
The chart remains frozen.
So I thought I misunderstand anything.

Unfortunately there is not a native "delete item from list" Block roty. Are you using an extension to delete?

Perhaps you should share an image of your Blocks and show how you are attempting to:

Search the Web for "linked lists".

That's what AI2 uses

Sri, I mean standard AI2 list block

[quote="roty, post:4, topic:152427"]
"remove list item " block
[/quote] just not in English :wink:

See this Drunkards Walk sample.

1 Like

Thanks a lot for all your help!

The Drunkards Walk sample example is exactly what I would like to do. Just much better realized!

Now it works as expected and I can continue.

1 Like

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