how to filter on a field of a specific tiddler ?

51 views
Skip to first unread message

vpl

unread,
Aug 16, 2021, 8:48:03 AM8/16/21
to TiddlyWiki
Hi,

I'm blocking a the current issue.
I want to apply a $listwidget on the value contained into a specific tiddler variable

The following code works fine

\define test_project()        $:/temp/project-1
<$list filter="[{$:/temp/project-1!!alarms}!match[]]" variable="has_alarms">
   <<has_alarms>>
</$list>

But when I want to use the test_project macro name (defining the tiddler) this does not works ..
<$list filter="[{<test_project>!!alarms}!match[]]" variable="has_alarms">
   <<has_alarms>>
</$list>

Any idea that would help me ???

Thanks a lot for your support

Vpl

TW Tones

unread,
Aug 16, 2021, 8:52:19 AM8/16/21
to TiddlyWiki
Try this;

\define test_project() $:/temp/project-1
<$list filter="[<test_project>get[alarms]!match[]]" variable="has_alarms">
   <<has_alarms>>
</$list>

When you go from a text reference transclusion "{$:/temp/project-1!!alarms}" to a filter "[<test_project>get[alarms]" you can't just change half the text reference.

Tones

vpl

unread,
Aug 16, 2021, 9:31:15 AM8/16/21
to TiddlyWiki
Magic !! Thanks a lot. THis is working fine

Regards

Reply all
Reply to author
Forward
0 new messages