# I can't get value from firebase

**URL:** <https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007>\
**Category:** Questions about Thunkable X\
**Created:** [September 27, 2019, 11:09am UTC](https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007 "2019-09-27T11:09:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![D.J\_TRUMP](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/d.j_trump/32/30794_2.png) [@D.J\_TRUMP](https://community.thunkable.com/u/D.J_TRUMP)\
**Post date:** [September 27, 2019, 11:09am UTC](https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007/1 "2019-09-27T11:09:56Z")

</div>

while i trying to get data from realtime database, my screen just all turn to this.

 ![Screenshot_20190927-190200794](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/b/abe4636eb90b828028604200ec683b080145f470.jpeg)  
what should do to fix this bug?

And this is my code.

 ![44](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4d669e2fb5f8b7144675fb445068b086af8fb797.png)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [September 27, 2019, 11:34am UTC](https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007/2 "2019-09-27T11:34:01Z")

</div>

Hi, @D.J_TRUMP! 👋

* * *

This could help you **find the bug** -

> In your **`RealtimeDB.get()`** block, (in the if statement), add an **`else`** block. and set a label’s text to **`error`**

➡ Pseudocode -

```
realTimeDB.get( key ) {
     if (not error) {
            listViewer1.items = list;
     } else {
            label1.text = error;
     }
}

```

* * *

Hope I helped you! 😄

# Thanks! 😊

---

<div class="post-metadata">

**Author:** ![D.J\_TRUMP](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/d.j_trump/32/30794_2.png) [@D.J\_TRUMP](https://community.thunkable.com/u/D.J_TRUMP)\
**Post date:** [September 27, 2019, 11:40am UTC](https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007/3 "2019-09-27T11:40:46Z")

</div>

@kartik14 sorry it doesn’t work, it still the same error here. after opening my app for a second, then it just turned to empty screen. Is the my getting value’s code correct?

---

<div class="post-metadata">

**Author:** ![Daniel\_Coglitore](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@Daniel\_Coglitore](https://community.thunkable.com/u/Daniel_Coglitore)\
**Post date:** [September 27, 2019, 10:36pm UTC](https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007/4 "2019-09-27T22:36:54Z")

</div>

there is nothing wrong on your code is just that firebase works a bit different on thunkable X like example…

when you ask for true or false from firebase it would just read it as a text and no as a boolean

and it also doesn’t detect list … so you have to save the list as a text csv (comma , separate value) and when you ask for the list you’ll have to convert the text into a list with the block “make lis from text”

I don’t know if they fixed this it seems like it doesn’t other wise you wouldn’t make this post

but working with objects in firebase is a lot better than working with list it gives you more possibilities , take a look at that

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:08pm UTC](https://community.thunkable.com/t/i-cant-get-value-from-firebase/247007/5 "2024-11-08T12:08:51Z")

</div>


