Arrays in Datatiddlers

65 views
Skip to first unread message

max.e...@gmail.com

unread,
Dec 8, 2007, 4:27:16 AM12/8/07
to TiddlyWiki
I realize that the information saved in JSON format in the <data> </
data> section of a tiddler is put into an array as a whole, and
handled that way. It seems to be standard to use each tiddler as a
record in a table, and I see that in a lot of places. The datatiddler
doc mentions that it can also store arrays. Is there any provision
for working with the data that way. I'd like to contain an entire
table of data in a tiddler and be able to display and edit any one
given row at a time, just like in an actual database. I _can_ take
the "one record/row per tiddler" approach, but it just seems far flung
to me. Any suggestions or information on this would be welcome.

Eric Shulman

unread,
Dec 8, 2007, 6:41:04 AM12/8/07
to TiddlyWiki
http://www.TiddlyTools.com/#SliceGridPlugin

Although you would still need to store each record in a separate
tiddler, you can use "slice tables" to define the name/value pairs for
the fields of each record, and then use the <<sliceGrid>> macro to
extract data values from those tiddlers and generate a single, tabular
summary report of all relevant slices, listing one tiddler per row,
with slice names as column headings, and slice values in the cells of
the table.

In addition, <<sliceGrid>> allows you to EDIT IN PLACE within the
generated table: just click on a cell and it changes to a text input
field. When you edit the value and press enter (or click away from
the input field), the modified value is automatically written into the
slice table of the associated tiddler.

Also, I'm working on an update to SliceGridPlugin that will allow it
to use Saq's new TableSortingPlugin (http://tw.lewcid.org/
#TableSortingPlugin), so that in addition to edit in place, you will
also be able to click on a column heading to sort the grid by the
values in that column.

Instant "single-table" databases, self-contained inside TiddlyWiki
documents... whee!!!!

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

max.e...@gmail.com

unread,
Dec 8, 2007, 7:45:22 PM12/8/07
to TiddlyWiki
That's a solid idea, and I like the upcoming sort feature. If I can't
get my entire datatable in one tiddler, I'll consider that approach.
One of the main reasons I'm investigating the one table/one tiddler
method is to make export very simple. The optimum goal would be to
import a single tiddler and end up with a functioning editable table
of data.

Am I the only one thinking about this?
Reply all
Reply to author
Forward
0 new messages