How do I store the values entered in the text box? Save the values after exiting. Maybe TinyDB?

How to store the values ​​entered in the text box? Save the values ​​after exiting. Maybe TinyDB?

You have your answer

1 Like

Unfortunately, it could not be resolved. Can you help me ? How to assemble with a text box to work?

What did you try? Show us your blocks.

1 Like

I want to record the results of each text box or label. But an example of how it is possible to save text box or label data would also be enough.

In “Tag” add an empty text box. Then call it what you like.

In “valueToStore” put Label1.

To learn more about TinyDB click here.

1 Like

Unfortunately it doesn't work, something is wrong.
Does anyone know the solution?? Please.

you are storing components, which does not make sense
you should store its Text properties, for example Label1.Text or Textbox2.Text

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Dear Taifun,
Thank you very much, this is very useful information, everything is here!
Best Regards,
Norbert Varga

I want to make sure that in all the textboxes I use, I save the values ​​even after exiting.
I've tried a lot of variations, it just doesn't work. What is the problem?? Does anyone know what could be wrong?

Please do this :
get an image of your blocks (→ right mouse click in Blocks area)

1 Like

you might wnt to use the ActivityStateChanged event from the tools extension like this

if state = pause
then save your values

Taifun

1 Like

Are you retrieving the data you stored in TinyDB?

1 Like

Is it possible to do that??

It downloaded it, but it wasn’t good for the example below. : /

What exactly is this ?? Is this always necessary?

Yes.

Save each textbox value to a different tinydb tag when the user presses the Calc button
When the Screen1.Initialises, recall the value of each tag and set the value to the respective textbox.

If you use Taifun's textbox extension you can save the values of each textbox without clicking the Calc button

1 Like

Is that right ?

nearly....

image

1 Like

yes, as already said earlier

Taifun