“Select list item” Error in Proceeds Report (List Length Issue)

Hi everyone, I’m currently working on a proceeds report for my app. I’ve already finished the start–end time feature, but I’m having trouble with the report details.

It’s supposed to display something like this:
entryX (product/service the customer bought) - qty (amount bought)
for example: apple-3

However, the details aren’t showing up in the ListViewer. I keep getting this error:

Select list item: Attempt to get item number 5 of a list of length 4: [com.google.appinventor.components.runtime.Label@25a2d89, com.google.appinventor.components.runtime.Label@5582ab2, com.google.appinventor.components.runtime.Label@b389a03, com.google.appinventor.components.runtime.Label@758ad80]

I’ve attached images and the .aia file for reference.
Any help or suggestions would be really appreciated — I need to fix this as soon as possible. Thank you!
aaaaa_copy.aia (1.3 MB)


In context to the next image, I separated the blocks — one connected to the HomeScreen.initialization and another connected to the End Sales btn — because I wanted to focus on handling the details part of the proceeds report separately.

image

you are calling length wrongly

try this way

2 Likes

A similar app

1 Like

Thank you so much for pointing that out! I’ve fixed the length issue, and there’s definitely some progress now. However, the variables still aren’t showing up — do you have any idea what might be causing that?


Do the same for QtyText as you did for EntryText above it.
Also insert lable6.text block inside the above if condition.

Thanks for the suggestion! I tried it, but it’s still not displaying in the format I wanted, it only shows [],


image

Send the updated .aia

export_and_upload_aia

Here it is

aaaaa_copy (1).aia (1.3 MB)

Did you mean like this

Close, for example: apple-3. The format is entryX (product/service the customer bought) - qty (amount bought)

You did not follow what i said before.

Oh, sorry about that, I meant to remove it! I only added it temporarily to check if the quantity was being stored correctly.

Like I mentioned, I meant to delete Label6, it was only there to check if the quantity was storing correctly.

I tried doing that though, it's still [ ],

But it works for me

I think the problem happens when I combine the start/end time and the details sections. It was working fine before I put them together. Could you please help me find a solution...

This is how it fully looks like when I've combined them


Again you put label6.Text block wrongly

Please put label6.text as image below

I meant to delete it, sorry..