On Friday, April 17, 2020 at 8:59:44 PM UTC-7, Steven Schneider wrote:
>
> How do I get a list of tiddlers with a field that has a specified value.
> I have TiddlerA with tag "howdy" with field "special" with value "Yes"
>
You can use two nested $list widgets, like this:
<$vars tagName="howdy" fieldName="special" fieldValue="Yes">
<$list filter="[tag<tagName>has<fieldName>]">
<$list filter="[<currentTiddler>get<fieldName>match<fieldValue>]"
variable="is_match">
<<currentTiddler>>
</$list>
</$list>
</$vars>
The outer $list widget finds all tiddlers tagged with <<tagName>> that have
a field named <<fieldName>>.
The inner $list widget tests each tiddler to see if the value of the
fieldName matches the <<fieldValue>>.
Then, for each tiddler with a matching value, it does something (in the
above example, it just displays the name of the tiddler)
enjoy,
-e
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/cc2e4aac-15e1-4a68-b87f-7cf87f00d434%40googlegroups.com.