Data Viewer List + Firebase + Local Data Source

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

1 Like

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

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

1 Like

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

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.

1 Like

https://x.thunkable.com/copy/cbd19ea018c74b468ab3b81ebdb34214

I think this is much quicker than Firebase.

1 Like

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).

1 Like

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.

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.

1 Like

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

https://x.thunkable.com/copy/cbd19ea018c74b468ab3b81ebdb34214
this should work.

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?

1 Like

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.

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.

1 Like

Glad it’s working for you.

Sorry, I don’t get you?

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.

1 Like

Weird.

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. :roll_eyes:

1 Like

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

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:

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

1 Like