Search code examples
app-inventor

TinyDB enter and display text in mit app


in MIT App Inventor how can I do this?

I want to enter in a text-box a name and in another one an ID and use the same button to save data. The data entered must survive an app restart, and to be able call it somewhere else in app.

It is possible/difficult ? I mean the names and ID's can be many. After that how can I call a specific ID from the list?

Here is a screenshot! Thank you! enter image description here


Solution

  • Create two empty lists, one for names and one for IDs. And data to them on button press. Create a tinyDB element. and store those data to that with two different tags, one for name and another for ID.

    For you to understand it better, here is the screenshot of the blocks.

    updated blocks

    For getting all new entries in new line, do this: enter image description here

    Front End of the app:

    front end

    Hope it will help you