Empty list index 1 when adding new value

in my app i use global block to create empty list, and then when specific button pressed it add some value as item in the list.
the problem is, that its alwas has an empty item in index 1 in the list. is there any solution for this? or there something wrong with my block.

sry for my bad english :frowning:

Show your blocks.

1 Like


Sorry for wrong Information.

Wrong, value could be anything. What @ADDYLIN is doing is just the same as the OP.
Edit: The information is deleted.
You have to confirm that value is a list.
Secondly, why there is two loop, @reisai

1 Like

what part is a loop? im sry, im not a programmer so i dont particularly familiar with programming term.

btw the data from firebase is not a list, so what im tring to do is to form the data from the firebase into a list.

i tried, but the app crashes

Loop is something like for each item in the list or for each number, etc. I don’t think you want to make a loop in a loop.

first loop is some kind of filter, so the 2nd loop for data that will be shown is the specific data according to the filter

What filter? I don’t see any. You should use only one loop I think, delete the inside one. Also, the variable item with the same name, so there might something wrong.

can you point out the variable with the same name?

The the variable of “item”
Btw, I don’t why you add the whole value to the list.

I’ve changed it like this, but the result is still the same

okay i already solved it by add remove list block with item index 1

thank you for all the help :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.