TinyDB with buttons

That's because you have not retrieved the data from TinyDB_STATS nor pre-processed it (added-up all the TL, T2, T3 etc values per player.) Your output should be only from the TinyDb records, you should not 'hard code' player names.

Also, I see you are only exporting a Match? Before you were interested in 'Season-so-far'.

My bad, translator confused me. The idea is do match by match and aggrupe them in a excel

And how can I do that an also watch the time I pressed the button?

The 'test' button that prints the stats on-screen - that code is how you extract the data.

That would be much easier to do in code before sending to Excel than performing the task in Excel.

That needs a better description, I don't understand :thinking:

But I don't know how, and in excel yes.

Wgen I press a button, for example TL YES, in test label it puts the time that I pressed the buttons, so I want to know how pass all the data (and also the time) to the excel. Because now I can put the label test in the excel, but not in columns.

OK, I can take a look at it for you but not today as my wife has become unwell and I need to take her to see a doctor.

Don't worry first things first and it's something that doesn't rush

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