Getting information from a data list from Firebase

Hey!

I am creating for the first time an APP for a project and now i am a bit lost… I have searched a lot but i found too much of different information. i have tried try everything it have occurred to me, but I haven’t got it right when it comes to my issue.

So my problem is, I have some data on Firebase, which is a bit extended. First you can find some names and then, on another key you can see some other information. I would like to have a list with the names (which at that moment I have it) but also I would like to incrase this information, such as clicking each data from the list and getting an alert with the info or travel to another page and receive the information there or whatever I can do it similar to that.

I have read in some discussions that I can not use Firebase to do this second part that I want (receive this other information apart from the name), and I didn’t understand why not and what should I do.

I don’t know if I have explained myself and if I made myself understood but I would be very grateful if you could help me on this issue :slightly_smiling_face:

2 Likes

Can you provide an example with a screenshot of your Firebase data tree?

Your explanation is general and any answer could be a good answer for it but might not benefit you.

1 Like

Hi Laia, congrats on beginning your first project! If you don’t mind, can we (anyone who views this page) take a look at your blocks? As well as if you would be able to deploy some false data and share the screenshot of what it looks like in your realtime DB?

From my understanding, you would like the trigger of selecting a name to result in the information from another tree (with a different key) being shown correct? As well as the opportunity to modify said data? Is this correct?

1 Like

First of all thank you for helping me!

So there are some screenshoots:

Screenshoot Firebase1

Okay so this is one of my json tree structure. We have the key of the group/ and then its number according to the chronological order of creation. :arrow_up:

Screenshoot Firebase2

Okay, so this is one of my json tree structure. It has the email for the principal user and then if the people has some intolerance to fructose, gluten or lactose. Finally we can see the group name and the emails of the members of the group.

I can only insert 3 medias as I am a new user, so I am going to replay again!

The previous reply was screenshoots about Firebase. Now we have the thunkable box:



And then we have the structure of the Thunkable that I have right now and it is working. Here i create a list every time the users logs in the APP. Now I would like o create an alert or something for giving the information that i don’t give at the list. In the list we can only see the name of the group, and I would like to recieve the other info, such the members and the intolerance.

I think I have to explain myself a little bit. “Buscador grups” is the current page and the “Numero” are the numbers of the json tree. Then, “Usuari principal” is the principal user, “nom grup” the name of the group, “persona” is person 1, 2, etc. Finally, “Llista grups” is the current list that I have created.

Thank you very much!

1 Like

Thank you for the explanation. Tomorrow I will create a sample database in Firebase similar to yours and create a quick demo for what I think you should do.

[Edit]
I created in my Firebase database for 4 items only
image

Following is how to access it in Thunkable
image
This will retrieve the information from the database and display the number in the List Viewer

When you click on an item in the list the following is used to display the details.
image

This is the app output

and this is a link to the project
https://x.thunkable.com/projectPage/6167ec04214aa60011ae014c

1 Like

Thanks for that!

I have been trying, and it would have been a great solution but there is another aspect that i didn’t remembered to said…

I need to filter some data before showing them on the list. The term Usuari principal, that in English would be translated as principal user, has to register before doing anything on the APP. Then, if the email that she or he has provided on the sign in is the same as in the database (even if it is the principal user or another of the three different people) the name of the group has to be showed in the list. If it isn’t like ths situation i would like not to mention on the list.

I hope it is easy to add this feature. Thanks for all again!

1 Like

I added few codes to the main block as follows

Now you will see only the email address of the principal user matching the variable currentUser. Of course in the real life example it will be the email from the login screen.

Again, if you want to add other conditions you can add inside the loop as required. Another issue, is the items click will need to be changed but now let’s focus what you want in the main list.

1 Like

Thank you, this has been very useful for my project!

The last thing that i would like to ask is about the items click. If I click some item it woud show me the information of one group but if I click another item the labels doesn’t change. In addition it only shows me the info about one group, the 0, and the others is like it doesn’t exist as any item I click it only shows me this particulary info.

Again, thank you very much to take your time to help me with this issue!

1 Like

I have adjusted the sample project. Check it and let me know
https://x.thunkable.com/projectPage/6167ec04214aa60011ae014c

Sorry for replying so late…

I have adjusted your sample project into mine, and it almost works perfectly! When I want to get the data I recive all of it from all the groups. How could I stop the loop with only knowing the information of the item that I had just clicked?

Thank you for your time!

1 Like

You need to share your project and probably the Firebase API key and Database URL so I can check and see what you mean.

You can send them in a private message if this is better for you.