Iam facing this error "Select list item index is too large" i can't find out where this error is coming from

I am facing this select list item index is too large error i cant find the error is comes from.i add index 2 iam getting the two datas from firebase but iadd 3 datas from firebase this error is coming
My firebase have 2 item the error is not coming
But iadd 3 items and add index 3 coming this error

To check this remove all block and start to add one by one to clearly know which block throws this error

Yes i recreated the project and add one value then two but 2 datas get without any error but the 3 value added the error is coming
What is the solution for this…?

Dear Anugrah,

This error means that the length of the list (let suppose) is 2 and you are trying to select the third item from list causing error.

do all your firebase items have 3 value inside?

Yes, my firebase haves 3 datas

Do all the items contain three values?

Example

Item1
-value1:β€œβ€
-value2:β€œβ€
-value3:β€œβ€

Item2
-value1:β€œβ€
-value2:β€œβ€
-value3:β€œβ€

Item3
-value1:β€œβ€
-value2:β€œβ€
-value3:β€œβ€

Yes my firebase structure contains 3 values exactly like this

These are all your blocks?

Yes this all are my blocks

Try to catch the output from Firebase_Database1.GotValue in a message dialog.

I call firebase value to message dialogue then showing the 3 values title,subtitle,and image url

hmm very strange,
also because I see that you only select the third index every time.

just to understand, try selecting index 1 in all select list item.

I tried with index 1 and changed so many times but not working yet.
I have one doubt this problem is comes using dictionary blocks?

It depends on how you structured your data

My firebase stsructure is like this

Example
Item0001
Image
Text
Subtext

Ahhh, now I remember! This was the project I helped you with.

When scrolling, the RecyclerView processes each item one by one.
For every view that gets generated, the dataItem looks like this:
dataItem = ["item0001", {"image": "imageurl", "text": "text1"}]
then:
dataItem = ["item0002", {"image": "imageurl", "text": "text2"}]

You need to select index 2 to access the dictionary: {"image": "imageurl", "text": "text1"}.
Do not change this index!
In your blocks, you’re selecting index 3, which doesn’t exist.

  • Index 1 = "item0001" β†’ item name
  • Index 2 = {"image": "imageurl", "text": "text1"} β†’ the dictionary"

1 Like

Ok its working thankyou

1 Like