Eric,
That's great, thank you. Now I can have:
<table>
<$list filter="[prefix[Job Number:]]">
<tr><td>{{!!title}}</td><$list filter="[<currentTiddler>indexes[]]"
variable="thisIndex">
<td><$view index=<<thisIndex>>/></td>
</$list></tr></$list>
</table>
Which returns a nice table.
There are still a couple of issues.
First, if the text reference contains a wiki link, like "[[Link]]", then it
is not returned as a link, but just as text with the square brackets. It
would be nice to be able to have that as a link if it wants to be, and to
ignore it if not.
Secondly, how can I set the order of the index list? It seems to be random
at the moment. I'd like it to be in the order of the data in the tiddler,
or failing that, alphabetical.
Thirdly, is it possible to return the names of the values, and not the
values themselves? If that were possible, the a macro could be made which
would do something like this:
<<data-tiddler-table "[prefix[Job Number:]]">>
would give a table with the first row:
| data value 1 name | data value 2 name | data value 3 name | data value 4
name |
and then one row per returned tiddler with the form:
| data value 1 | data value 2 | data value 3 | data value 4 |
That would be very generally useful!
On Sunday, March 27, 2016 at 11:12:30 PM UTC+4, Eric Shulman wrote:
>
> On Sunday, March 27, 2016 at 4:30:49 AM UTC-7, Matthew Petty wrote:
>>
>> I am exploring the use of data dictionary tiddlers, and they seem to be
>> very useful as a way of having data stored in the text of a tiddler, rather
>> than in a field or tag.
>>
>> - So the question is, is there a way to go through all the text
>> references in order and return their values? Then I could do a macro
>> which
>> would return a row of a table, without having to specify the text
>> references.
>>
>>
> You can use the indexes[] filter to get the names of the items in a data
> tiddler:
> http://tiddlywiki.com/#indexes%20Operator
>
> Something like this:
>
> <ul>
> <$list filter="[prefix[Job Number:]]">
> <$list filter="[<currentTiddler>indexes[]]" variable="thisIndex">
> <li><$view index=<<thisIndex>>/></li>
> </$list>
> </$list>
> </ul>
>
>
> Note the use of variable="thisIndex"... this allows the inner $list to
> loop through the items without changing the value of "currentTiddler" that
> was set by the outer $list.
>
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
> InsideTiddlyWiki: The Missing Manuals
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/69bcc23b-72b9-4641-b2d4-c1c9c09f35b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.