I’m creating a small “database” for a local community in TW and I would like to sum all values in a table and maybe do some operation across tiddlers with the results of operations in another one (something like when you use results in a particular sheet of a table in another sheet in programs like LibreCalc, Gnumeric or Excel).
I have been looking for information about spreadsheets in TW Links and I have found the Excel Like Table, but, despite being interesting, its syntax seems cumbersome. Also I have found Formula for TiddlyWiki (BTW the demo link doesn’t work), that is more similar to what I am looking for, but it operates on tiddler fields, instead of on table columns.
I have also seen the How to sum a data tiddler?, How make filter to sum up field values? and even a discussion about Alternatives to data tiddlers? and How the TW internal data structure looks like and why data-tiddlers are not optimal. My feeling after looking at them and trying to even think in more structured data in TW, is that simple key-value data tiddlers are “too flat” and putting, calculating and cross-referencing information via data tiddlers is cumbersome (but maybe there is a better way that I’m not aware of).
What I would like to have is something like “named tables” in tiddlers syntax like this:
| !name | !value | !month |
| Enie | 1 | Feb |
| Minie | 3 | Jan |
| Maynee | 4 | May |
| Mo | 5 | Jun |
> myTable | This is just a longer caption associated with the table.
And be able to put in a tiddler field some kind of formula, like:
{{{ [[<currentTiddler>get<myTable#!value>sum[]] }}}
to obtain 13
(with maybe a more tiddlywikish syntax for the formula).
I presume that this means a major change in TW syntax or major knowledge about how to extend it. Or, as said, maybe is a better way that doesn’t imply to spread only key-value information across several Tiddlers. Maybe the route is to make the TW parsing capabilities on its own tables available via some plugin, so it can be extended as I propose.
Which could be the route to make operations on rows and columns TW tables data available to the wiki user, with the frequently friendly and succinct syntax that characterizes TW?
Ps: having named tables would enable us to use them in internal references, like see table [[ExTiddler##myTable]] for more details
.