# How do I list Firebase information

**URL:** <https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376>\
**Category:** Questions about Thunkable X\
**Created:** [March 12, 2024, 5:33pm UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376 "2024-03-12T17:33:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)\
**Post date:** [March 12, 2024, 5:33pm UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/1 "2024-03-12T17:33:15Z")

</div>

Hi, can anyone help me? How do I get all this “tarefas” information that’s in the userID and list it in a list?

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/4/943e536dd5205f1222b6e40175820380f5b616e2.png)

---

<div class="post-metadata">

**Author:** ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)\
**Post date:** [March 12, 2024, 6:33pm UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/2 "2024-03-12T18:33:53Z")

</div>

I tried to do it like this but only one task appears, not all of them.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/e/3e16c75e1f1277028f3b143acd7f1187730ad5ca.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 12, 2024, 7:05pm UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/3 "2024-03-12T19:05:31Z")

</div>

What are you trying to determine? If you check for divisibility by 1, isn’t that going to work for any numeric value? Are you trying to determine if a Firebase value is a number or text? Or something else?

What happens if you display the variable j as a label’s text and add a Wait block right after that so you can watch the values from Firebase change during the for loop? Are the values what you expected? If so, those values are text strings, not numbers. So you might need to convert the depending on what you’re trying to determine.

---

<div class="post-metadata">

**Author:** ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)\
**Post date:** [March 12, 2024, 7:12pm UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/4 "2024-03-12T19:12:36Z")

</div>

I’ve tried it so too, and it really works it shows all the “tarefas” of the user, but in case when some user doesn’t have any “tarefas” in firebase it gives an error… The error says that there is some wrong block.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0eda9bf364106fbdb5971c4d2c978556dc9d9f02.png)

---

<div class="post-metadata">

**Author:** ![luiz.primaz2ddpyu](https://avatars.discourse-cdn.com/v4/letter/l/e9a140/32.png) [@luiz.primaz2ddpyu](https://community.thunkable.com/u/luiz.primaz2ddpyu)\
**Post date:** [March 12, 2024, 11:14pm UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/5 "2024-03-12T23:14:07Z")

</div>

The result is like this, the list showing all the “tarefas” that are in the user’s userID(users), but when there is no task in the “tarefas” in the user’s userID it ends up giving an error that I don’t know how to resolve, I had added that division account because I was looking at another topic here in the community, but now that you said it I removed it but another error occurs, before with the division account it worked almost 100%, the problem is that all the division tasks did not appear. “tarefas” only appeared one. The error that appears when there is no division account and there is no tarefas in the user’s userID is that there is a wrong block.

 ![Screenshot_20240312_200652_Thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/2/62b06aa94254052021b33371577e632c5582aa5f.jpeg)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 13, 2024, 5:00am UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/6 "2024-03-13T05:00:10Z")

</div>

The best way to fix that is to make sure every user has the “tarefas” property, even if it’s empty. But if you can’t do that, try this…

Project link: [Thunkable](https://x.thunkable.com/copy/379bc3f48e65c4644b10395ec81e7e29) (see the first screen)

The code below loops through the users and tries to get the “tarefas” property. If it can’t, it replaces the value with an empty string (“”). That way there is no error. To change the `get property of object` block to the one in the screenshot, right-click on the block and choose Show advanced block.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/f/1f27f91fdf6e91e56c803d6476017d65fe5b9811.png)

I used this JSON (scroll down or copy it to see the full JSON):

```auto
{
  "usuarios": {
    "IGC1PAvIczT4I8xDogLHZBljCUB2": {
      "tarefas": [
        "ffu",
        "ffu7w7w",
        "ffu7w7wuid",
        "dhh"
      ]
    },
    "NewUserID12345AbCdEfGhIjK": {
      "proyectos": []
    },
    "UsrID67890ZxYvUtSrQpLmN": {
      "tarefas": [
        "task1",
        "task2",
        "task3"
      ]
    },
    "AnotherUsrID54321MnOpQrSt": {
      "tarefas": [
        "itemA",
        "itemB",
        "itemC"
      ]
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 11, 2024, 5:00am UTC](https://community.thunkable.com/t/how-do-i-list-firebase-information/2889376/7 "2024-06-11T05:00:17Z")

</div>

Closed on June 11, 2024, 5:00am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
