Local DB - persistence of data values using the Local DB.SetCell method


#1

Hi all,

I was using the Local DB for the first time today for a simple “enter and then graph” data app (two fields), and I quickly discovered that (at this point in time) it isn’t possible to add rows to the Local DB.

I thought a simple work around would be adding “dummy rows” and then manually keeping track of where the real last row is by way of a stored local variable. I did put values (non blank) within the dummy rows.

While this strategy worked fine during any individual usage of the app (e.g. I can add a few rows, view a graph and see the new rows, add a few more, see the additional rows on the graph, etc.) the changes to the Local DB made using the SetCell method do not appear to be persistent beyond a single app session. Specifically, if I get out of the app and restart it, the Local DB changes I’ve made using SetCell are lost.

The Local DB.SetCell method also never appear within the “Click here to edit spreadsheet” design view, including while I’m using the app. I do however know the Local DB data is being changed by the SetCell method, as I pull data from the Local DB as a separate operation in order to graph it.

Is there some sort of Local DB property I may have missed that would enable persistence?

I should add here that I’m using an iOS phone platform, and that I know from practice that stored local variables are persistent across app usage (for example, the aforementioned actual last row of data variable).

Thanks in advance for any help you may be able to offer!


Alternative for TinyWebDB in Thunkable X
#2

apologies for not thinking to add a link to the project file, here it is:

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


#3

Very thorough explanation of your issue, and presentation of your app. You are a great example of getting help here.

I am going to try to recreate the stickiness issue you presented, however I will be doing it on android, and only from companion.

I will paste my text blocks. It might not be for another 20 minutes or so till I get to start on it. Screaming kids right now :slight_smile:

UPDATE

I confirm that modifications are not sticky, and I confirmed this on android, in companion/live mode with the following blocks.


#4

Thank you for your kind words and confirmation of what I’d experienced.

What’s the next step now, is there a process for bug reporting that I should follow or is this venue sufficient to get in front of the development team?


#5

@Domhnall Can you please make sure this gets on the bug list please?

Slainte.


#6

Hi!

I signed up to the forum precisely for this issue. Thanks folks for the excellent writeup.

At a minimum @Domhnall is it possible to revise documentation to clearly state that you can’t persist data between sessions?