How can I resolve these list errors?

Hello. I'm creating a add cart system, then when I'm displaying the cart to other screen this error would come out.

Here's the error even the database is empty this error would display.
Screenshot 2024-04-27 021546

Then here if I add to cart then the item 2, or 3 is empty this error would display.

I know the system is trying to get the selected list but it not enough, but I want is even the list is not been met, this would not display.

Here's how I display my Cart to other screen.

before selecting something from a list make sure, the list is long enough... use the length of list block...

how do you store the list?
your list has one item, which is is a list of 3 items

Taifun

This is how I save my list.
This is not the updated version but this is same way I save my list.

It's working fine but the problem is that error will always pop up if the user did not save the intended list that system should display in list. For example I have 3 product that I would display, if I only add cart 2 items this error would display when I came to cart page, but when I complete add cart 3 items this would not pop out.

as you can see yourself in your blocks you have a main list and add a list of 2 items (well, you said it is not the updated version... why do we have to look at old blocks?

learn to work with lists and list of lists, see the tutorial mentioned earlier

Taifun

Sorry about that here the updated version. I'm using my phone earlier that why I can only give the old version Hehehe...

You can just use if Chicken.Visible, no need to compare texts

If you made some lists of your components, and used the advanced anyComponent blocks, you could easily use just one if statement.

and use Do it to debug your blocks

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


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

Please read this tutorial on how to do a cart:

You don't need (or want) a component for every possible cart item.