Hi,
I was trying to display a list in list viewer by using Firebase DB. Unfortunately, if I open the screen in which that list viewer is in(Read Recommendations), it duplicates the same values each time I open the screen.
I tried clearing the list viewer before adding the list items, but no luck there!
Here is the code:
Please note that the value in variable ‘Book_List’ are being saved in another variable called ‘Books_List’.
I have also attached the screenshot of the code in the screen where I enter the list items as well below:
I had read all the other community discussions similar to this but there is a slight difference: Since this is an app which can be accessed by every user, there are scenarios where the user will be giving the same values as another user had given. I do not want to clear these values. I only want to clear the values which the bug in my code has duplicated.
Thanks in Advance,
Vikhyath
Hi Sir,
I tried what you said, but now nothing displays in list viewer because the variable is empty when it is displayed in list viewer since I set it to empty list.
This is the way I have changed the code as per your suggestion:
The image of your Firebase means you tried to save a List into the DB directly
Firebase does not actually know how to deal with simple list and therefore it saves it and adds internal identifiers to refer to it in the correct way.
I advise you delete this entry and start fresh the appropriate way. Refer to Thunkable documentations to see how to save lists to the database.