Berne Campbell
2017-10-09 09:53:01 UTC
Hi,
I really like TiddlyWiki (TW5). I have been saving some data as fields in
Tiddlers so that the data is more structured. I figured I'd be able to use
this structured data in powerful ways as I learnt more.
I am now trying to filter tiddlers based on one of the fields I have called
"length". I have foobar tiddlers with lengths 3, 8.4167, 9, 11, and 11'
(that's a single quote as in 11-feet).
In a tiddler I am trying to display a table of all foobar tiddlers under a
certain `length`. This is one of my attempts: -
<table>
<th>foobar</th><th>length</th>
<$list filter="[tag[foobar]has[length]nsort[length]]
+[get[length]allbefore[9]]">
<tr>
<td>
asdf <$link><$view field=title/></$link>
</td>
<td>
<$view field=length/>
</td>
</tr>
</$list>
</table>
------
I am selecting all the tiddlers tagged `foobar` that have a length field,
and sorting them numerically by the `length` tag. This works as expected. I
then try to filter them to return only those under a certain length. I
can't work out how to get the allbefore operation to work on a field rather
than a title. If I do `get[fieldname]`, I can use `allbefore`, but then I
don't know how to get the tiddler rather than the field.
Another problem is that when I use `allbefore[10]` the filter returns no
entries. I'd expect it to return the foobars with `length` less than 10
such as 3, 8.4167, and 9, but it returns none. Similarly any multiple digit
parameter for the `allbefore` operator does not work as I expected, they
all return no entries.
I have been googling, reading the TiddlyWiki documentation, experimenting
and searching this group and I can't work out how it's meant to work. Can
someone please enlighten me.
Thanks,
Berne
I really like TiddlyWiki (TW5). I have been saving some data as fields in
Tiddlers so that the data is more structured. I figured I'd be able to use
this structured data in powerful ways as I learnt more.
I am now trying to filter tiddlers based on one of the fields I have called
"length". I have foobar tiddlers with lengths 3, 8.4167, 9, 11, and 11'
(that's a single quote as in 11-feet).
In a tiddler I am trying to display a table of all foobar tiddlers under a
certain `length`. This is one of my attempts: -
<table>
<th>foobar</th><th>length</th>
<$list filter="[tag[foobar]has[length]nsort[length]]
+[get[length]allbefore[9]]">
<tr>
<td>
asdf <$link><$view field=title/></$link>
</td>
<td>
<$view field=length/>
</td>
</tr>
</$list>
</table>
------
I am selecting all the tiddlers tagged `foobar` that have a length field,
and sorting them numerically by the `length` tag. This works as expected. I
then try to filter them to return only those under a certain length. I
can't work out how to get the allbefore operation to work on a field rather
than a title. If I do `get[fieldname]`, I can use `allbefore`, but then I
don't know how to get the tiddler rather than the field.
Another problem is that when I use `allbefore[10]` the filter returns no
entries. I'd expect it to return the foobars with `length` less than 10
such as 3, 8.4167, and 9, but it returns none. Similarly any multiple digit
parameter for the `allbefore` operator does not work as I expected, they
all return no entries.
I have been googling, reading the TiddlyWiki documentation, experimenting
and searching this group and I can't work out how it's meant to work. Can
someone please enlighten me.
Thanks,
Berne
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/bfa29455-180a-4f99-9aa0-c879366723b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/bfa29455-180a-4f99-9aa0-c879366723b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.