Hello:
Is there a way to use an argument instead of hard coding the sortBy
conditions in an FET?
For example, in a tiddler called getList-containsAllcontainsNone-byModified
(see first listing below) and
used <<tiddler getList-containsAllcontainsNone-byTitle with: "dev gcmd
wintr" "" "*" "\n">>
<<forEachTiddler
where
' tiddler.tags.containsAll("$1".readBracketedList()) && !
tiddler.tags.containsAny("$2".readBracketedList())'
sortBy
'tiddler.modified'
descending
write
'"$3"+" [["+tiddler.title+"]] ^^(c:
"+tiddler.created.formatString("YYYY-MM-DD")+"; m:
"+tiddler.modified.formatString("YYYY-MM-DD")+")^^"+"$4"'
begin '"("+count+") Tiddlers ^^[containsAll=$1;
containsNone=$2]^^\n"'
none '"("+count+") Tiddlers ^^[containsAll=$1;
containsNone=$2]^^\n"'
>>
would it be possible to substitute a parameter so I could use different
sortBy conditions?
Maybe something like the second listing below
<<forEachTiddler
where
' tiddler.tags.containsAll("$1".readBracketedList()) && !
tiddler.tags.containsAny("$2".readBracketedList())'
sortBy
'"S5"'
descending
write
'"$3"+" [["+tiddler.title+"]] ^^(c:
"+tiddler.created.formatString("YYYY-MM-DD")+"; m:
"+tiddler.modified.formatString("YYYY-MM-DD")+")^^"+"$4"'
begin '"("+count+") Tiddlers ^^[containsAll=$1;
containsNone=$2]^^\n"'
none '"("+count+") Tiddlers ^^[containsAll=$1;
containsNone=$2]^^\n"'
>>
BTW I tried this and the fifth parameter seems to be ignored.
ISteve Wharton
--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.