Using TiddlyWiki, I'm trying to show, in a specific Tiddler, a subset of all the fields of that tiddler, with their values.
The problem is, while I'm able to list all the relevant fields' names, I cannot print their value.
My current code is:
<$list filter="[fields[]prefix[Result_]sort[title]]" template="$:/zx/ListFieldItemTemplate"/>
... which aims to list all the fields starting with Result_.
The (simplified) template $:/zx/ListFieldItemTemplate is:
<div>
<$view field="title"/>
</div>
My fear is that the list widget is only sending the names of the fields, not the values, which means there's no way to get that value from the template. So I may need to somehow send the values, too. But I don't know how.
One possibility is to use a macro.
In your tiddler, put the following macro call:
(The aim is to filter the fields only to those starting with "Result_".)
Then, create a new tiddler, whose name is not important, but which must contain the tag
$:/tags/Macroto make that macro globally available. And in that tiddler, write the following code:This will output something like:
Of course, you can then modify the macro to use your own formatting.