How do I get a list of tiddlers from a filter and then manipulate the fields / tags on each in a loop?

44 views
Skip to first unread message

leeand00

unread,
Apr 16, 2020, 2:42:40 PM4/16/20
to TiddlyWiki
I'm aware there are widgets that will modify them...for instance <$action-listops>
can modify fields, but I don't know how to use a filter like [tag[some-tag-they-all-have]sort[create-or-mod-date]] and to loop through them performing a similar action on each.

I'd also like to be able to include an index, or obtain them sorted by create-or-modification date.

Thank you,
    Andrew J. Leer

Mat

unread,
Apr 16, 2020, 3:31:18 PM4/16/20
to TiddlyWiki
This is the basic idea

<$button>
execute
<$list filter="...">
<$action-setfield .... />
</$list>
<$/button>

Ref 

<:-)

Mat

unread,
Apr 16, 2020, 3:32:17 PM4/16/20
to TiddlyWiki
Ah, last part should be </$button>

<:-)

Xavier Cazin

unread,
Apr 16, 2020, 3:34:21 PM4/16/20
to tiddl...@googlegroups.com
Hi Andrew,

Action widgets can only be triggered by a user action, like clicking on a button, dropping a tiddler, or loading the wiki. They can't be triggered by, say, the $list widget, eventhough you may use a $list to produce some of the action strings.
\define done() 
<$action-listops $tags="done"/>
<$action-sendmessage $message="tm-copy-to-clipboard" $param=<<now>>/>
<$list filter="[tag[bar]]">
  <$action-setfield foo="done"/>
</$list>
\end

<$checkbox checkactions="<<done>>"> Is it done?</$checkbox>
In the example above, the list of actions to be executed when the box gets checked are grouped in a macro.
The list of actions to be executed are most often passed to the control widget via an actions attribute.

Best,
-- Xavier


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d03f9ffd-18d9-4f89-b0fd-82a32f9b54bd%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages