How can i pull all data in firebase to list in thunkable?

Could you please show your blocks and an image of the screen with the results?

Based on the realtime data in your last post, it looks like you might be creating two separate milestone objects instead of one milestone object with 2 properties.

1 Like

Hi,

Thanks again for reply. Have attached 3 screen shots.

Design - The design of the app
Block 1 - Blocks where I have initiated variables, defined how to enter text and then how to write it to Realtime DB. I am entering Milestone No. in Text_MS1 and Milestone details in Text_MS2
Block 3 - Blocks where I am trying to retrieve all the Milestone nos. and Milestone details after clicking Back button

1 Like

Hi guys,

I was able to get the problem solved and I was able to read all the data from Firebase to the app. But now there is a 2nd poblem :slight_smile: - when ever I reopen the app, the old data doesnt get captured.

Do have a look at my project and suggest if you have any solution. My project link is
https://x.thunkable.com/copy/55d15a229db93d07676ed7cdb64d73e2

1 Like

I have kind of the same issue. I have this database structure:
image

I want to collect data from it and present it in a list viewer. But whatever I tried, some other loops to, I did not get anything in my list. This is the block I used for that:
image

Do you have any idea how to fix this?

1 Like

h.s.vreemancru4v4,

I have seen and experienced the same problem. Many people have this issue. The problem is that the Realtime_DB1 Get block is asynchronous. If you want to use it more than once, you must tell Thunkable to wait until it is finished.

There are many possible solutions. Below is my current favorite solution.

Create a Get Cloud Property function EXACTLY as show. You can then use this function anywhere you would otherwise use the Realtime_DB1 Get block as I show in the example “Any Button” click event. This example uses a list parameter called “KeyPath” to map the JSON key hierarchy. The Return values is whatever it finds at the end of the path. For your example, it returns the value in Title.

Happy Thunking!

2 Likes

Hi I am a newbie. I have the same problem. So the list of data that i am trying to get from my firebase is as follows


I tried to follow the solution closely. However i cant seem to find the COMPONENT block.

I am not able to get my list of data from firebase. May I know where i went wrong? Thank you.

2 Likes

The easiest way to start is to open a screen and add a List Viewer in it. Then in the block screen add this code

If you have already connected your firebase to your project, you should see a list of all vehicles in the screen.

3 Likes

Can you please explain more
I need this too
I have a product that I have it in the fierbaas
And I want to show them in my app by the data viewer

2 Likes

Please note that DVL (Data Viewer List) requires a direct connection to a table and cannot be used with Firebase directly.

For the example of the vehicles, if you want the data displayed in a DVL instead of the List Viewer then you will need a Local Data Source. You will use a list variable to store the values from Firebase and then you will loop through all the values in the list and save the values in the Local Data Source table you created. This table is connected with the DVL and the data will show in the screen this way.

I hope this is clear.

2 Likes

but like that the app will not work slowly ؟؟

by the way
Do you have Example app such as usual :sweat_smile:

thank you

1 Like

Thank you. I follow this steps. However, only the each study appear and not the details of it as shown below.


I cannot see the number of each vehicle counted. How do i improve on this?

1 Like

That’s a good result.

Now you can add labels in the screen to any information you want to display. When you click on any item in the list, you need something similar to this code to display the values stored.

image

Of course, you will need to do it for each piece of info you want it displayed.

Happy Thunking

2 Likes

Thank you. I successfully displayed all of them on my app.

2 Likes

Glad to have helped

2 Likes

amazing solution… solved my issue after ive searched alot for this. thank you.

2 Likes

Please don’t bump topics to the top because it spams the forum and prevents us from seeing what is important. Just give a like to muneer’s post to share the love :heart:

3 Likes

@deeparaj096t5s70 If you have a tutorial video to share with the community, instead of posting it on multiple topics and bumping them all to the top of everyone’s list, just post in the Tutorials category once.

4 Likes

hi. nurfarhanah1997. i have question to you about the code. do you mind give your email for me to contact

Hey @najah8998nbkxk

What’s your query?! :slight_smile:
Are you working with lists in firebase?

yes. I’m having problem that thunkable does not show the data from firebase. I had follow the step from muneer but still no data appear on the app


1 Like