Error: list index smaller than 1

I also have the same error: list index smaller than 1
Please how can I solve this.

I seem to have understood that if the data does not exist in the cloud, the error is generated, if so, how can I get around it?

Test the length of the list before trying to select an index

How can I do?

Can you give me an example, I know I should know how to do it but unfortunately that's not the case.

Find the is list empty block as well as other list blocks like length of list in the list drawer

Of course now I understand everything.
Thanks Tima12. Don't laugh and don't get impatient.

But as you well know, even if it's not your problem, I program, using 90% of the code that I find in the forum, on YouTube
and on sites that deal with the topic, I often manage to put everything together to create something good and I often get stuck as in this case.
When I insert code created by me at most I go from: if the else- clik button- false- true- and something else that I don't list. but it's really the bare minimum.

Often, even when someone sends me example blocks as in your case, I struggle to understand where to insert them in the project, luckily I often succeed.
So please can you send some sample blocks? Thank you.

Here is some Pseudo code for you

If not is list empty of the list you get back from CloudDB
Then select the first item

You can learn how to work with lists here


Can you bulk transfer what you wrote?
If I had a memory, I would be a scientist and certainly a programming genius, but I don't have a long-term memory, so there's no point in me learning anything.

I have tried and tried again, but nothing can be done, even when I write pieces of my code, if I have to do the same operation again, I have to reprogram as if I had never written that code, because I don't remember it.

In fact, when I find an error that I don't know how to resolve, I turn to you and if even in this case I don't succeed, I will be forced to redo the entire project.

Unfortunately it's a shortcoming of mine, I can't do anything about it, but I like programming and I think I certainly won't stop because of this problem of mine.

For me, programming and solving puzzles is like solving a crossword, but putting together pieces of code created by others to create often useful apps.

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.


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

I can't post the blocks for particular reasons.
But I can explain to you what those blocks I sent are for.

  1. I have a list with names
  2. I transfer the name to the text of a button
  3. as soon as the transfer takes place, the screen opens at the same time containing the button with the name to which a list is associated
  4. if the cloud contains data corresponding to this list they must be displayed, the same must happen for each name chosen by me from the previous list.
  5. if there is no data, the list must remain empty. but still be displayed. (and it is at this point that the error occurs, in fact since there is no data in the cloud the list cannot load it and therefore gives me an error.)
  6. naturally that name on the button and the data in the list (if existing) must be able to be saved, so that they can be found again when the app is opened.
  7. each list must be able to be eliminated both for the corresponding name and globally for all existing names.

I have already achieved all this, but if you could achieve it with your own hands and more professionally, solving the problem for me, I would be grateful.

I also attempted to have the entire project done for a fee in a more professional manner. But it wasn't possible.
I already made it entirely, so once I fixed some problems like this and added two more anointings, it would be finished.
Then I will need to make it work on other operating systems and on Android PCs and TVs. I hope to find someone to help me, for a fee of course.

Two examples in blocks for you


Thanks, It doesn't work, maybe I did something wrong?
I tried both blocks

I will leave you to figure out what you did wrong with your blocks

Don't worry, I wasn't wrong, I only posted the second test even though I thought it was absurd, but there's no harm in trying, because with global objects instead of global list-global.list , I had already tried with both of your blocks.

I understand that it is difficult to help me without being able to see a large part of the project, but thank you anyway, it's only my fault. I'll try to do it on my own. thanks again so much.

simple answer:

you don't need to pick (set global element) first, no math is here required

Thanks everyone, I'll try it and let you know.