TinyDB loses the data

Hello.

I make a schedule control application and TinyDB loses the data.
This happened to me after the update of the KODULAR page.
I attach images of lops blocks and the screenshot.

Welcome. Nothing changed with the TinyDB component. Show more info.

2 Likes

Thank you.
I already uploaded the data.

TinyDB data appears one second at startup and then is deleted, then the notification appears.

You talk of a problem with TinyDB but the only place where you use the absolute block is with your FireBase.

What are you trying to achieve with your app?

1 Like

Hi @sarkochile welcome to Kodular Community
The error tells you two things:
1.abs can not accept string
2.string is empty

So use companion to debug blocks

1 Like

image

This way absolute can accept a string. Not directly but by using a variable. But you are getting an empty string because the on text changed block is executed every time. So when it is made empty you get the error.

1 Like

Use is number? and if-then-else blocks to avoid that error.

1 Like

I try to save the hour and minute data in Firebase.
The app still reads these values from Firebase on a main screen and saves it in TinyDB.
When you go to the screen to change this data, only at the beginning it shows what is saved and then it is deleted, indicating the error.

I think better use Time picker for that instead a textbox

2 Likes

you also might want to learn how to switch screens correctly… else you will get out of memory error soon… see tip 1 here


Taifun

2 Likes

Thank you all.
The fact that you should debug it is correct.
What I don’t understand, is that being in “Connect to Companion” works for me without problems.
When compiling it, the information is deleted.

Thank you very much to all.
Migrate all to a single page, as indicated by @Taifun and I also used the Time picker, just as @pipechela did.
I debugged it according to what was indicated by @Peter and @vknow360.
A hug from Punta Arenas, Chile.

Saludos y felices fiestas patrias desde La Ligua

1 Like

The companion uses another database. It’s a database that it’s inside the companion app. The apk Will use a database inside the apk app

1 Like

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