Issue with "select list item list"

Im developing an app that take a data base from a web’s source code(name, ID and product’s price) and made a ListView with all the products
There was 23 products so 23 codes in app for each one
But today the website changed and now there are 20 products.
When i click the button to get the items, i get this error:

Select list item: Attempt to get item number 21 of a list of length 20

Is there a way to skip when this happens?

I will upload a screen shot from my code

before selecting the 21st item, you might want to check, if the list is long enough... you can use the length of list block for that...
http://ai2.appinventor.mit.edu/reference/blocks/lists.html#lengthoflist

Taifun


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

The list was long enough, but some products on the website got out of stock temporarily.
The app at the begining it worked, with the 23 products

You could try using the Screen Error Block to give a more User-Friendly message such as “out of stock”.

Check first “responseContent”

Label1.Text = responseContent
if responseContent= …
then
Label2.Text = “no existe”
else
CampoDeTexto4.Text=join…

How is it possible to debug this without seeing sample responseContent?

well, theoretically all products could be out of stock...
you have to check the number of returned products in the Web.GotText event before displaying them

Taifun