Filter for child tiddler of tiddlers by prefix??

222 views
Skip to first unread message

HC Haase

unread,
Aug 9, 2016, 4:12:26 AM8/9/16
to tiddl...@googlegroups.com
It could be that I am organizing in the worst possible way, but is there a way to filter all tiddlers that has a tag starting with a prefix XX?

My situation is:
I have a structure (with tags) like:

Journal tiddlers
  worklog 2006/08/08
     task a
  worklog 2006/08/09
     task b
     task c
 I want to filter for all tasks regardless of date. I tried to use [tag[prefix[worklog]]] but that don't work.

The problem is that the task have a random case number as title, so I cant sort for "task".

I started this structure because it is so fast and nice to split a tiddler with the new edit toolbar. It gives me a nice structure fast.

thanks

PMario

unread,
Aug 9, 2016, 8:47:17 AM8/9/16
to TiddlyWiki
Hi HC,

To create lists, we need some parameters to create filters. .. The most common one is "tags". So how are your journal tiddlers tagged? (TW default is: Journal) ... In your case I could imagine "worklog" for your "worklog YYYY/0MM/0DD"

And the tasks could be tagged with the "worklog YYYY/0MM/0DD" name. ..

In this case it would be easy to create a list, that you want to have. .... If you just want to use the names and prefix / suffix and regexp filters, it will be much more complicated and fragile, as it could be.

have fun!
mario

HC Haase

unread,
Aug 9, 2016, 10:08:00 AM8/9/16
to TiddlyWiki
Hi Mario
Thanks for the advice.

Yes.
tiddler task a
   is tagged "worklog YYYY/0MM/0DD"
      
is tagged "worklog"

(see screenshot)

but I don't really understand how I can filter the tasks, as task a and task n don't have any tags in common. Thy do however have tags with the same prefix in common ("worklog" ). can you filter for tags with a prefix or is there an other way?


(in the screenshot below worklog=arblog and task a = 25569 and task b =25550)



Auto Generated Inline Image 1

Mark S.

unread,
Aug 9, 2016, 12:00:21 PM8/9/16
to TiddlyWiki
Since each of your "Worklog yyyy/mm/dd" entries are also tagged, try:

<$list filter="[tag[worklog]] +[tagging[]]" />

The question is, are tasks the only things that are tagged with work logs?

I feel there must be a way to go about this that uses fields instead of tags, so that your tag-space doesn't become so cluttered.

Good luck!
Mark

PMario

unread,
Aug 9, 2016, 12:43:24 PM8/9/16
to tiddl...@googlegroups.com
Hi,

I see. So I guess you want shorter lists. .. Some example follow

<<list-links filter:"[tag[worklog]prefix[arblog 2016/02/]]">> ... uses the prefix operator: see: http://tiddlywiki.com/#prefix%20Operator:%5B%5Bprefix%20Operator%5D%5D%20%5B%5Bprefix%20Operator%20(Examples)%5D%5D

more to come.
-m

PMario

unread,
Aug 9, 2016, 12:58:46 PM8/9/16
to TiddlyWiki
Using an input field and a regexp.

Create a tiddler eg: myAdvancedSearch  with this content

term: <$edit-text tiddler="$:/temp/input/reg" tag=input size=80 placeholder="enter the search term" />

<<list-links filter:"[tag[worklog]regexp{$:/temp/input/reg}]">>


----
In the input field type eg: /02/   or    log   or  16/02   or ...

see: http://tiddlywiki.com/#EditTextWidget:%5B%5Bregexp%20Operator%20(Examples)%5D%5D%20%5B%5Bregexp%20Operator%5D%5D%20EditTextWidget

-m

PMario

unread,
Aug 9, 2016, 1:01:23 PM8/9/16
to TiddlyWiki
let us know, if you need more :) ... Just ask!

You may also try to search this group again. You may get some hints. 

have fun!
-mario

HC Haase

unread,
Aug 10, 2016, 7:10:00 AM8/10/16
to TiddlyWiki
SUCESS! thank you
 
Since each of your "Worklog yyyy/mm/dd" entries are also tagged, try:

<$list filter="[tag[worklog]] +[tagging[]]" />


@Mark S. The tagging[] macro was all that was needed. I had forgotten its existence.

I usually just need to make an advanced search so i will be using the filter
[tag[worklog]tagging[]]


@PMario
thanks for all the input. I think I will have to play with the list-links more.

For now I made a tiddler with
<<list-links filter:"[tag[worklog]tagging[]]">>

This gives me the list I need.

Reply all
Reply to author
Forward
0 new messages