How do you check the last element in a list view?

Hello
I have a loop which shows the elements of a list view in a text box
How can I check when it reachs the last element
Thanks

Use the blocks from the list drawer, in your case length of list

Btw. what about using a for each item in list loop?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

You can check the length of list and get item for that index and compare list item when matches then perform your desired action.

To simply this u can use Get last item block from ListUtilz extension.

Please provide a screenshot including the loop, so we better can understand what you are doing

Taifun

loop

Currently you always set the index back to 0, so on each Timer event always the first element of the listview will be displayed
To fix this, add an if statement like this

If global index = length of list...
Then set index = 0

Taifun