List view items, saved in Firebase, disappear and are not seen

I am using list view and firebase. Every item that the user adds to the list is saved in Firebase. And then it reflects in the list view. The list viewer is found when initializing a page of my app. Everything perfect until there.
The problem is that when I go to a different page of the app. When I return to my previous page, the data entered in the list (which was previously seen) disappears. The user must find and see the data they have added, but this simply disappears if they leave the page on which they were entered. Any suggestion?

Can you show your blocks? meanwhile, this problem occurs because you should retrieve data you stored from firebase on screen initialize, and then set your list view elements to the value you got.

My blocks are in Spanish, can you understand them? When I started making my blocks, (following a tutorial) I did it with TinyDB. And the data was saved effectively, so even if I went to other parts of my app, the data was still there. I’m trying to do the same with Firebase, but it doesn’t contain the same block as TinyDB. So now I don’t know how to create the same effect. (Sorry, sure there is another way to do it, but it’s the only one I learned.)

This is my model with TinyDB. When starting the page, the data that I previously entered is displayed. How do I achieve the same with Firebase?

Tiny db has a getValue block, GotValue event will be fired as soon as the component gets the tag, just you will need to put your blocks in GotValue event, and replace all of call TinyDB1. getValue with the value variable in GotValueEvent, and in the screen intialize event put GetValue block, which exists in firebase.

Hmm … can you show me how to do it please?
Sorry I’m really sorry, but between having to use a translator and starting programming recently, I didn’t really get your advice :pray::pray:

Here is an example:
image

I think it has been asked before. Here’s the solution: :sweat_smile:

Thank you very much, but that’s with TinyDB. It works correctly but I need to achieve the same with Firebase. I tried to follow the advice of Mohamed but I get an error, so I don’t know what to do

1 Like

Can you tell us what is the error :slightly_smiling_face:

I put my blocks in the way that (if I understood correctly) you advised me. The data is saved in Firebase, but not in the app, when I go elsewhere it keeps disappearing

how your firebase is, how you want to show your data? as you call firebase two times, the data will got ovewritten.

Hmm, how is my Firebase? I do not know what you mean. Realtime dataebase, I don’t know what else I can tell you.
I want to show them in list form. And they do! But if I leave the page, when I return the elements are no longer there. If there’s a way to do it, even if it’s different from what I’m doing, please tell me :pray::pray:

Thanks, so I’ll call Firebase just once.

mean how it’s structure , you can post a screen shot if you don’t mind.