[TW5] Multi-level filtered lists syntax help?

116 views
Skip to first unread message

Matthew Petty

unread,
Jul 8, 2014, 4:34:15 PM7/8/14
to tiddl...@googlegroups.com
I use TW5 to keep track of tasks. Tiddlers that are tasks are tagged "task". I have 2 fields, "p" for priority and "tasklist" for "work", "home" etc.
How can I generate a list of tasks, broken down into nested lists of "work", "personal" and so on, with the tasks below sorted by priority?

Like this:
Tasklist: work
_ task a (priority 1)
_ task e (priority 1)
_ task c (priority 2)
_ task b (priority 2)
_ task d (priority 5)

Tasklist: personal
_ task x (priority 1)
_ task z (priority 2)
_ task y (priority 3)


This is what I have so far. It doesn't work, of course, but I at least wanted you to know I was trying.

<$list filter="[!title[JournalSkeleton]!has[draft.of]tag[task]!tag[done]!sort[p]each[tasklist]]">

! Tasklist: <$view field="tasklist"/>
<$list filter="[!title[JournalSkeleton]!has[draft.of]tag[task]!tag[done]!sort[p]]">

<$checkbox tag="done">
<$link to={{!!title}}>
<$view field="title"/>
</$link> (priority <$view field="p"/>)
</$checkbox>
</$list>
</$list>




Dominic Brocher

unread,
Jul 8, 2014, 5:22:17 PM7/8/14
to tiddl...@googlegroups.com
Hi Matthew

You have to filter the inner list with the current tasklist value. Try this

<$list filter="[!title[JournalSkeleton]!has[draft.of]tag[task]!tag[done]!sort[p]
each[tasklist]]">


! Tasklist: <$view field="tasklist"/>
<$list filter="[tasklist{!!tasklist}!title[JournalSkeleton]!has[draft.of]tag[task]!tag[done]!sort[p]]">


<$checkbox tag="done">
<$link to={{!!title}}>
<$view field="title"/>
</$link> (priority <$view field="p"/>)
</$checkbox>
</$list>
</$list>


Regards,
Domnic

Matthew Petty

unread,
Jul 8, 2014, 5:28:10 PM7/8/14
to tiddl...@googlegroups.com
That did it!
Danke viel mal Dominic!




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/3QawVN-ZY1Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Matthew Petty

unread,
Jul 8, 2014, 6:04:45 PM7/8/14
to tiddl...@googlegroups.com
I have a further question. Is there a way to do all this just with tags, and not with fields? Is it possible to filter on tags, but only looking for the first few characters of the tag? Like you can do with titles.
The problem is that I would have to go back and set all the fields on my task tiddlers. It's easier to set tags in bulk, or with a checkbox.
That did it!
Danke viel mal Dominic!




To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.

Stephan Hradek

unread,
Jul 8, 2014, 6:35:52 PM7/8/14
to tiddl...@googlegroups.com


Am Mittwoch, 9. Juli 2014 00:04:45 UTC+2 schrieb Matthew Petty:
I have a further question. Is there a way to do all this just with tags, and not with fields? Is it possible to filter on tags, but only looking for the first few characters of the tag? Like you can do with titles.
The problem is that I would have to go back and set all the fields on my task tiddlers. It's easier to set tags in bulk, or with a checkbox.

If it's just ONE tag that each of the tiddlers has, it's easy:

field:tags/^FirstCharacters/

If there is possibly more than one tag per tiddler, but none of them has spaces, try:

field:tags/(^| )FirstCharacters/

And finally, if spaces in tags are occuring:

field:tags/(^|\[\[| )FirstCharacters/

But be aware that the last one might give you false hits! Example:

If a tag "a b" exists and you want to find tag "b", this one will also find "a b".


The trick is to make the filter handle the tags-field like a normal field and to search it using a regular expression.




 
Reply all
Reply to author
Forward
0 new messages