See for JSON
I’m making an app to study a few words a day stored in local storage.
The words in local storage are deleted every day, so we want to bring the updated list back.
So I want to reload the entire key every day.
Is that the right answer?
I don’t know how to use the method shown.
Are the words always alphabetized? Does the user always study them in the order you showed above? If so, then you don’t need to delete anything. Just use a “marker” variable to store where the user left off. If the user studied 5 words then set marker to 6. If they then study 6 through 20, set the marker to 21.
Then, always display the data starting at row equal to marker.
The order is random.
The words studied are not in order. Deleted, undeleted, deleted, deleted, undeleted.
This can be done this way.
@mom7667yafy Are you saying that you are deleting the local storage data every day or that it happens automatically?
The user deletes the data every day. There are 10 memorized words today. But I only memorized five. This deletes only five memorized words from storage. So it’s random.
Memorized words are stored separately in different storage.
And the next day I start with words that I can’t remember yesterday. The user will study the words called 1 to 10 in order in the storage.
Right but you as the programmer determine what actually gets deleted, regardless of what the user experiences.
I haven’t used local storage before but it seems like you can have multiple databases and call each one by a different key.
I guess I don’t really understand your question. Are you asking how to organize your databases? Or how to code them?
My question here is asking if there is a block function to get all the keys on local storage at once. When I import the key, the word is the key, so I think that I can search for it and delete it. But if I don’t get the keys all at once, it’s hard to code.
I would not make each word a key. That’s way too much work and not an efficient use of a database. Just save the updated list to a key and then retrieve it when needed.
I’m not at my computer but I can make a demo later.
Wait a minute… how are you storing the word list in the app? When I added a Local DB, there isn’t an option to import a csv file. Which component are you using for your database?
Why wouldn’t you use something like Airtable which is much easier to manipulate, both for importing/updating data and for deleting rows?
Airtable can be a little slow for data retrieval but you only need to pull a few words at a time so it should work well for this.
I use it like the attached picture.
I pasted 12000 words from Google Spreadsheet into a local DB spreadsheet.
The words stored in this local DB were read into local storage.
The csv file could be loaded directly in the App Inventor2. I talked about that experience.
It is faster than reading from local DB, so I asked if thunkable has this feature.
I wonder what efficient coding is taking a short time and is good to manage.
I don’t use airtable because I don’t know how to use it. And my service is enough to service locally.
I think I should learn if it is better and fits my service.
I’d recommend trying out Airtable. I can’t imagine making an app like you describe without being able to delete database rows. I just tried to make a demo and gave up very quickly because the idea of copying a table that is 12,000 words long into another table but without a few words just so I can have the effect of deleting those original rows is
I followed these instructions to set up an Airtable account and connect it to Thunkable: https://docs.thunkable.com/spreadsheet.
I just checked the limits though and saw that the free version of Airtable only supports 1200 rows. You could test it with 1200 though.
I would like to solve my problem with local storage.
airtable is paid, slow and available only online.
Can you answer my most curious question now?
How do I code to get all the key values from local storage all at once?
How is that possible with the get object properties of for json that actech told me to see?
I do not know how.
Anyway, if I only know this way
I think I can implement the form I think.
There are a total of 100 keys in local storage. Today we randomly delete 10 of them. The next day will load all the keys on the local storage. And we randomly delete four of them.
To implement the above method, you need to be able to load local storage keys at once. But thunkable blocks don’t have that functionality. Is the get object ~ for JSON mentioned above a block that implements the functionality I require?
I do not understand.
I would like to show you a block coding snapshot of how you can use it specifically.
Is the get object ~ for JSON mentioned above a block that implements the functionality I require?
You should check it yourself. Thunkbale X can solve many problems in several ways. You write that you are new to development. But in this case, you need to spend time exploring the capabilities of Thukable X. You immediately want to create an application, but without this necessary knowledge it will be very difficult to create it.
It was an easy task to do in appinventor. Anyway, can I do it if I study a lot?
Is it solved by studying a lot of the object components of the attached picture?
Yes, but besides these blocks you need to study all the remaining blocks + components.
thunkable has no blocks for deleting rows in localDB and no blocks for getting keys at once in local storage.
In some ways, it’s missing some of the most important features of running a database.
I’ve seen thunkable official documentation that the ability to delete rows is going to be updated in local DB, but it might be best to wait for them.
You are right, Local DB has incomplete functionality, which makes it easier to use other components. You can have advanced functionality for Local DB, but how much are you ready to wait for it? Are you ready to wait one year or more? I am not, so I am not using Local DB.