Quotes App - Button Previous - Error: List Index Smaller Than One

Hello,
Currently I am creating a quotes app with 150 quotes. I also have a favorites feature in it and have a problem with the Previous button. It comes in certain cases, which I don't understand exactly, the message "List index smaller than 1". The value seems to reach 0 and this seems to cause this problem. Does anyone know how to solve this problem? I have made two screenshots. If you need more screenshots about this, I'll be happy to provide them. Thanks a lot!

2023_02_27_00.10.30|690x431


No, at least not with these blocks.

Dear Anke,
Thanks. Do you know a solution how to avoid this error message with index smaller than 1? The Amazon app tests were successful with the previous apps, which had the same feature. But I think it is disturbing, if there is such a message, which pops up. Thank you!

As I said, such an error should not occur with the blocks you posted.

Dear @Martina_Ledermann ,
as @Anke already said, the blocks you posted shall not cause the error you show.
Therefore I've approached it in a different way, by creating an intermediate variable used as a pointer before using it as listindex (this avoids the error message).
The annexed aia works for me. Give it a look maybe it can help in finding what's wrong with your ones.
Cheers.

Listview.aia (2.9 KB)

1 Like

Dear Uskiara,
Thank you very much, I will try it out. I will give the community a feedback here. Thanks!

:+1:

Dear Uskiara,
Works. Great! Thank you so much, you saved my app! Thanks.

Dear @Martina_Ledermann,
happy to have been of some help.
Ciao, ciao !

:+1:

6 posts were split to a new topic: Error: list index smaller than 1