Displaying Saved Data to a Summary Screen

I am looking to save data/inputs from multiple screens and have them displayed on a summary screen. I started using a TinyDB to save the input from each screen. I am looking to have the saved information displayed as a list on a summary screen. Is this a feasible way of using TinyDB and accomplishing my objective?

How many screens?

1 Like

4 Screens.

In each screen that gets a number, save its value in an appropriately chosen tag (i.e. TOTAL FISH SALES/TOTAL CHIPS SALES/TOTAL TEA SALES) in TinyDb.
In your summary screen, run this code under a button click event:
Set SuperTotalLabel.Text to + (

  • (get TinyDB tag TOTAL FISH SALES default 0 )
  • (get TinyDB tag TOTAL CHIPS SALES default 0 )
  • (get TinyDB tag TOTAL TEA SALES default 0 )
    )

I create the tags, but how do I get the tags from TinyDB to show up on the summary screen?

You need to see the 3 numbers labelled and the addition, not just the sum?

you just use the GetValue method together with the tag you like to get

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 Our Tutorials! 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

That worked. How do I add more sockets to the get value block?

the GetValue block does exactly have one socket to get the value of exactly one tag
to get the value of another tag, use another GetValue block

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


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

Here are the blocks for my summary screen. You see only a single contest screen. I am looking to have the data from each screen displayed on the Summary screen.image image

as already said, use several GetValue methods together with the tags you like to get
Taifun

Using the GetValue block needs to have a socket to connect. I would like to press the Confirm button once and all 4 inputs from the various screens would appear.

use the join block from the text drawer

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 Our Tutorials! 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.