# Data Viewer List + Firebase + Local Data Source

**URL:** https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598
**Category:** Questions about Thunkable X
**Tags:** firebase, data-source, data-viewer
**Created:** [May 26, 2021, 5:51pm UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598 "2021-05-26T17:51:00Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 4:47am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/21 "2021-05-27T04:47:08Z")

</div>

Oh, that’s pretty simple. Give me a mo to create an example for you.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 4:48am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/22 "2021-05-27T04:48:30Z")

</div>

What data do you want to store in your app? Image, caption, anything else?

---

<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: [May 27, 2021, 4:49am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/23 "2021-05-27T04:49:35Z")

</div>

So each user has a username and then they can add “entries” that consist of a date, time, photo, and description.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 4:50am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/24 "2021-05-27T04:50:17Z")

</div>

Cool, thanks. This sounds like a job for the local DB rather than Airtable.

---

<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: [May 27, 2021, 4:53am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/25 "2021-05-27T04:53:03Z")

</div>

It’s the same problem, though. I don’t know a way to add records to the local DB. That’s the beauty of Firebase.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 4:55am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/26 "2021-05-27T04:55:06Z")

</div>

[https://x.thunkable.com/copy/cbd19ea018c74b468ab3b81ebdb34214](https://x.thunkable.com/copy/cbd19ea018c74b468ab3b81ebdb34214)

I think this is much quicker than Firebase.

---

<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: [May 27, 2021, 4:56am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/27 "2021-05-27T04:56:37Z")

</div>

Yes, but I would need a table for each user. I haven’t figured out how to add a table (either manually or with blocks).

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 4:58am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/28 "2021-05-27T04:58:32Z")

</div>

No, you wouldn’t (at least, form what I know). Since local DBs save their data locally, only that particular user’s data would be saved.

---

<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: [May 27, 2021, 4:59am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/29 "2021-05-27T04:59:13Z")

</div>

Oh, okay, I see what you’re saying. Sorry, you’re right. My mind is so wrapped around the idea of Firebase sign-in that I’m over-complicating things. Thanks for the demo! I’ll see if I can convert my project to use a local DB.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 4:59am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/30 "2021-05-27T04:59:54Z")

</div>

I’m making a demo for you, which should be ready in a minute.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 5:06am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/31 "2021-05-27T05:06:32Z")

</div>

[https://x.thunkable.com/copy/cbd19ea018c74b468ab3b81ebdb34214](https://x.thunkable.com/copy/cbd19ea018c74b468ab3b81ebdb34214)  
this should work.

---

<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: [May 27, 2021, 5:09am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/32 "2021-05-27T05:09:39Z")

</div>

Thanks! And when you say that you can take a photo and store it in the local DB, I assume you mean you can upload it to Cloudinary, generate a mediaURL and then store that in the local DB. Correct?

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 5:32am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/33 "2021-05-27T05:32:23Z")

</div>

Yep, you’re right! If you use Airtable, you can directly store the photo (no cloudinary), but then you’ll have to loop through all the records, and check if the username for each entry matches the user’s name, and add it into a list. Finally, we’ll need to loop through our list, and add each item into our local DB. Both are pretty quick, though.

Is the example working for you? I just used the default cloudinary settings, but it worked for me.

---

<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: [May 27, 2021, 6:06am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/34 "2021-05-27T06:06:34Z")

</div>

Yes. I’m using my own Cloudinary account but I was able to switch everything over to the local DB in my project.

I’m now having a separate issue with a custom DVL layout that no longer syncs the mapped data from the local DB. But that can wait.

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 6:11am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/35 "2021-05-27T06:11:34Z")

</div>

Glad it’s working for you.

> [@tatiang](#):
>
> mapped data

Sorry, I don’t get you?

---

<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: [May 27, 2021, 6:17am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/36 "2021-05-27T06:17:10Z")

</div>

Mapped data = data bindings. I can get the data from the local DB and I have it bound to each component but although that was working fine earlier, now it’s not. Now the DVL has the right number of rows but no actual visible data.

 ![Screen Shot 2021-05-26 at 11.16.07 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5fdec958738858f5f1939a22a357ab25f5802257.png)

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 6:19am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/37 "2021-05-27T06:19:49Z")

</div>

Weird.

---

<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: [May 27, 2021, 6:23am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/38 "2021-05-27T06:23:35Z")

</div>

Yep. And now it’s all fine. Everything’s working. I’ve had this happen **all day long**. The same code previewed at different times with different results. It’s a bit maddening! I was just going to post a screenshot of the DVL and a listviewer, both set to use the same DB values – one working and one not. But I just previewed it again and now it looks fine. 🙄

---

<div class="post-metadata">

### Author: ![codeswept](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeswept/32/87755_2.png) [@codeswept](https://community.thunkable.com/u/codeswept)
#### Post date: [May 27, 2021, 6:25am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/39 "2021-05-27T06:25:15Z")

</div>

I have absolutely no idea how that happened. Good it’s working for you again!

---

<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: [May 27, 2021, 6:26am UTC](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598/40 "2021-05-27T06:26:10Z")

</div>

And… now it doesn’t work again. Same exact code. Didn’t change a thing.

I Live Tested the project twice, about 3 minutes apart:

 ![IMG_4053.PNG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/7/3768f209eebac9f90e20765afb0bfa44d435af04.jpeg) ![IMG_4055](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/272056974d57b53b69d1a8a29da3860ae30b584b.png)

You can see that the list viewer shows two times (11:11 and 11:13). Those are from the “time” column of the local DB. The DVL is bound/mapped to that same column. In the first screenshot, those two times (11:11 and 11:13) show on the right side. But in the second screenshot, they don’t.

This is the **only** code running on that screen:

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

[Previous page](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598.md?page=1)

[Next page](https://community.thunkable.com/t/data-viewer-list-firebase-local-data-source/1309598.md?page=3)
