Items Repeating in Listview

Hello Everyone,
I am creating an interface in which the user enters their task and the task is stored in firebase.
The items are repeating (when ever I refresh the companion screen) in the List which I have created using Dynamic Components by @yusufcihan
The items are retrieving and are appending from Firebase Realtime Database, in Firebase all the items are arranged as I needed but in the app they are repeating almost up to 5 times.

My blocks

I am also getting an error
Runtime Error

Please help me to solve this out !

generally before selecting something from a list make sure the list is not empty


@Taifun Thanks for your response,
The list is not empty and is filled with items, whenever I add an item to the list the item repeats but in the firebase there is no repetition.

according to the error message, the list is empty

1 Like

@Taifun but in my app there is items but also its giving an error,
To clarify, I created new project but the same problem occurred and this is the snapshot of companion of that project

Attached the AIA and APK for your review
Items_Repeating_in_List.aia (71.5 KB)
Items_Repeating_in_List.apk (6.1 MB)


You need to accept that at some point in your blocks, you are trying to get an item from an empty list. Then you must debug your blocks where there is a loop with a list.

The image is too small on the smartphone.

1 Like

@Rogerio_Rios, As you said

so I tried.

I just created a new simple project in which I created a list manually from blocks and it WORKED, NO REPETITION

but unfortunately this data is not retrieving from Firebase, when I tried to retrieve the data from Firebase, the same problem arises

And I am getting the error

For the list item repeating issue you can add clear list code. (For dynamic extension you can remove item by id and remove old items)

@Kshitij Thanks for the response,
Can you please elaborate?

Is this a Code or a Block?

Every time create empty list before indexing new data, you can use Create Empty List on when got values rise

Right…and remove the used ids… :point_down::point_down::point_down:

Umm… I have just explained you how can you write the code. I am not using pc at the moment so I can’t show you the codes. Once I will get access to my pc I will tell you…

Thanks for the help the problem is solved.
However I am getting a new error.
Accept that everything is working good.
These errors are the links of the images which I am getting from firebase and putting them into Leoprofile extension by the method of select list item block.

And I also tried on screen error occurred block to ignore the error but unfortunately error is still appearing.

Can you please help me with this.

Your list is still empty.

Show your codes… and a what time you get this error…
Edit: I just saw your codes in that you have set that if tag is equal to a value then firebase DB save value help1 create empty list… Try to check you codes one by one and disable your codes to find your error…

This is what I was trying to say… Refer to these codes…