In TWC you could create a dynamically generated table using ForEachTiddlerPlugin, something like this:
<<forEachTiddler
where
'tiddler.tags.contains("ClinicalDiagnoses")'
sortBy
'store.getValue(tiddler,"wt")'
descending
write
'(index < 5) ? "| [["+tiddler.title+"]] | ("+store.getValue(tiddler,"wt")+") | +++^*@[>]...<<tiddler "+tiddler.title+"\>\>===|\n" : ""'
>>
Is there a relatively simple equivalent in the current TW5? I see something like it in this thread about editable tables:
https://groups.google.com/forum/#!searchin/tiddlywiki/editable$20tables/tiddlywiki/XeCYubR8YrU/J_buhitP9zsJ, but I was wondering if there's a simpler way (I look at that code and don't really understand it yet) to do the same thing?
The use case is this: I'm trying to learn TW5 by making a TW for assisting in swim coaching. I have a group of tiddlers (names of swimmers) tagged "swimmers", and I want to be able to generate a tiddler with a table of names and editable times based on something like this:
| <$list filter="[tag[swimmers]sort[title]]"/> | <$edit-text tiddler="50mFreestyle" field="time"/> |
but of course this will make only one row with all the names in the first cell and a single edit box for the one field
here's another idea I had that doesn't work:
macro:
\define race(name:"name" time:"0:00")
| $name$ | <$edit-text tiddler="50mFreestyle-$name$" field="time"/> |
\end
tiddler that calls the race macro:
<<race name:"<$list filter="[tag[swimmers]sort[title]]"/>">>
Ideally maybe there's a way to dynamically create a DataTiddler in the DictionaryTiddler format... I'm okay with having the info attached to the swimmers tiddlers but it would probably be better to end up with DataTiddlers for each "race"
Any suggestions?