How to show object atribitutes from firebase in a list

Hi, I want to know how to show this: Captura de pantalla 2021-02-17 a la(s) 6.02.22 p. m. (all the ‘‘NAME:’’)

in a list on the screen.
Thank you :slight_smile:

1 Like

I am sure you will find Darren’s video very useful:

Retrieve List_Cloud and assign it to a list viewer and you should see the names under it.

You can retrieve by the Get block or by cloud variables.

1 Like

Thank you! Can you show me the blocks of how to assign each new object to a new space on the list?

1 Like

Simply add a List Viewer in your screen and in the code do this
image

You will see the items of the list viewer as

  • Hernandez at 14:35
  • Hernandez at 17:45

and so on

1 Like

It did’t worked. It shows a message: Something Went Wrong. Check you blocks and reset this page.

1 Like

So this means that the key “Top_Cloud” is not a top level key.

Instead of just typing “Top_Cloud” as the cloud variable name, type the full path
TopLevel/anotherLevel/Top_Cloud

of course use the naming in your database.

It should work.

Ok, it kind of worked, but I have a new problem: Captura de pantalla 2021-02-18 a la(s) 4.07.19 p. m.

This is the code:

Captura de pantalla 2021-02-18 a la(s) 4.08.12 p. m.

Here you can see the whole firebase:

Captura de pantalla 2021-02-18 a la(s) 4.08.44 p. m.

1 Like

In the Get block use only List_Cloud.

It shows a message again: Something Went Wrong. Check you blocks and reset this page.

1 Like

Yes, you are correct. I rearranged the code to get the following
image

See this sample project. You need to supply the API Key and Database URL to get the results or copy the code to your project.

https://x.thunkable.com/projectPage/602ee2b0a694850011873461

[Update]
The first list in the app is to store the 0, 1, 2, … then the loop goes through each of the items in the first list to read the “NAME” and add it in the second list which is displayed in the list viewer.