Creating an editable and storable monthly table

Hi. This may be impossible, but I have a need for an app where the user creates a 2 column monthly table with fixed headings and layout. The user populates the first column and month+year of the table from a drop down list of variables. These won’t change unless you need to add a category not already mentioned in the drop down. Then the populated table needs to be displayed on another screen. But you would only display one table at a time. The 2nd column is populated separately by a separate single entry that includes the amount and category it relates to and month +year. The created table needs a running total at the bottom of the table. Each time an entry is made, the table is updated and stored for future use. The 2nd column boxes would only show the running totals for each category, not the individual entries with a total of the totals at the bottom of the table in a separate box!

The populated and updated monthly table (With the running totals) needs to be available for future callup and view?

I assume I will also need go back buttons or cancel entry buttons.

Is this possible and how would i go about setting it up?

The tutorials are good, but I think I am asking for unusual stuff!

Any ideas please?

Thanks

Probably by astute use of lists.

I might recommend the Tableviewer extension by @Kevinkun for display purposes.

There is also this dynamic and editable table

Thanks for your response - much appreciated.

Are you planning on adding daily entries?

It is easy to filter and sum rows using the AI2 advanced list blocks.

I see your data as a three column table:

  • Date (yyyyMM or yyyyMMdd?)
  • Category
  • Amount

You can persist this under a single TinyDB tag for the entire table, or shard it into yearly TinyDB NameSpaces for storage cleanup.

from

It's cleaner to sum up your data at display time than to tie yourself into knots maintaining subtotals and totals.

Hi ABG and thanks for responding.

The table is two column (Category and amount) with headers and a running total at the bottom. It also needs a date box at the top (yyyyMM)652 - otherwise that is it.

So, my thinking was that I could store a monthly finished table that is still editable, but you are saying no. Please can you clarify why?

Thanks

I am trying to distinguish between a user view of the table and the underlying table structure.

You mentioned that you want to store multiple categories.

But you want to see and edit only one category at a time?

What if you want to total across categories for a particular time span?

Here's one of many possible storage schemes.

Set your TinyDB NameSpace to the category in question ('entertainment') and store numeric monthly values under tag yyyyMM ('202603'), default 0.

In TinyDB NameSpace TinyDB1, store a list of category names under tag 'CATEGORIES', initially an empty list.

TinyDb has a block to return a dictionary of all tags and values in the current Namespace, which you can feed into a summarization procedure that takes 3 minutes to code using the advanced list blocks.

Thanks for your reply.

I want to enter an individual amount (relevant to a particular category), but don’t need to see it.

The aim of the resulting table is exactly how you have stated - as in to show a total amount for a particular category for a particular month. Along with the totals of the other categories for the same month.

Sorry if I didn’t explain it right the first time!

Are you interested in seeing daily expenditures in any category?
That affects tag design (inclusion of day of month.)

No, just a running total for each category for a particular month.

As new amount entries are made/entered, the totals increase!

Although I can think of another project where that would be useful! Hahaha!

It was easier to just code the app than go on and on about its design:

Sample run

monthly_totals.aia (4.2 KB)

P.S. I hardwired Categories into the Categories List Picker Elements list. I leave further customization to you.

P.P.S. I also forgot to clear the input text box after the Plus Click. I also leave that to you.

Thank you so much for your responses, it gives me a great start.

One last word of caution …

Do not confuse this with a professional bookkeeping system.

Bookkeepers keep details, enough to trace the flow of every dollar and cent.

Every transaction is stored, and summarization is left for later in reporting systems.

Don’t risk loss of livelihood or freedom on this app.

Ok thanks - the app is intended to just be an easy rolling total of social spend. Nothing more serious than that - I have Sage for the other stuff, but thanks for the warning!

One last question - Is it possible to show multiple categories at the same time from Tinydb and maybe a total of all the categories for a given month?

That would require looping over the list of categories.

The logic is similar to how I get a year total.

I’ll let you take a whack at that.