TinyDB with buttons

As an alternate, you can connect app with gsheet and do the rest if possible

...we spent the whole night awake in hospital, got home early this afternoon. The Mrs is much better at the moment though she hasn't been 'repaired' yet :grin:

Do all your T1, T2 etc buttons work, storing the data in TinyDB_STATS?

The main code for producing suitable output for Excel with be to loop through the Players and within that Loop, Loop through all the Matches.

The time records should be a separate analysis and that too is easier to produce in-App than in Excel.

Post your latest aia file for me to add an example output. I'll take a look tonight or some time tomorrow.

I'm glad to hear that

Yes, all the buttons work

RB_Virtual (1).aia (125.2 KB)
Thanks for looking it, I'm so grateful with you.

How can I connect it?

--- deleted ---

You can read here (script method ) METRIC RAT AI2 - Google Sheets for AppInventor (extension method) 🟩 [FREE] Google Sheets for AppInventor (replicant) using Google Apps Script for mor info

Credit to @TIMAI2

.... it might be built-in to the next App Inventor release.

Okay, I'll try do the tables in excel with what I have

I'm looking at your Project file - had to modify the buttons to be able to read their labels on my phone, in landscape mode :grin:

Something else you could work on is how to add a new player to the Squad. Typing the player's name in is easy but you need code to import the player's photograph. You also need to be able to delete a player from the Squad.

Imported photographs might need resizing. They will also need their own TinyDB and they should be encoded as Base64 text to save them in TinyDB, decoded back to an image when loaded from TinyDB.

Note, if a new player is added to the Squad during the Season, he/she cannot take the number (index) of an existing player. So perhaps there should be two or three holding places in the Player Manager table to allow for that.

If you are going to use Excel, You do not need the ASD folder or the Shared function. The CSV file can be saved straight to the Documents Folder.

Are you using Excel on your phone or your PC? If on your PC, you could save the CSV file to your Google Drive. Alternatively, as per Spicy_Topics' suggestion, you could upload the CSV to a Google Sheet and work online. Final alternative is to display the data as a Table in the App.

Yeah I'm doing that

I think that only adding the name and it appearing on the label test will be enough

What about this Chris?
image

You can't use it :grimacing:

....but we can do this:

I have to create new variables?

leave it to me :grin:

Thanks Chris

Hi Carles

Well, still a lot to do, as mentioned before. The attached 'RB_Virtual3.aia'

  1. Collates Season-so-far Player Match Data
  2. Saves the data as a CSV Table file in the Android shared directory 'Documents'
  3. Displays the data in-App

To fully test, you must build an APK. I have tested CSV files in the Google Sheets App and in a Spreadsheet App, both on my phone. More can be done in the App, for example a Table sort. You'll need something similar again for the time statistics, that needs some thinking about first!

RB_Virtual3.aia (151.8 KB)

Hi Chris,
The only thing that lack in the table it's the time to do the real analysis of data.
Still many thanks.