create a filter list that filters on included text and and excludes a specific tag

300 views
Skip to first unread message

Captain Packers

unread,
Sep 17, 2018, 11:46:15 AM9/17/18
to TiddlyWiki
I've been studying the list filter documents on TiddlyWiki.com but I'm still having trouble building a list filter that will show me tiddlers that contain a search string but exclude all those that contain a specific tag.

I'm not sure it was the best idea to combine them, but I have a GTD system and project support documentation all in one tiddlywiki. Now when I search for notes that contain a certain search string, the list often includes tiddlers tagged with @action or @project that have no content. I would like to build a search string that contains, for example, the word "inventory" but excludes the tags @action and perhaps @project.

Thanks in advance for your help.

Captain Packers

Diego Mesa

unread,
Sep 17, 2018, 12:04:54 PM9/17/18
to TiddlyWiki
Hello!

Unless Im misunderstanding, you can just use something like:

[regexp:text[filter]!tag[Learning]]

To search for all tiddlers whose text field contains the string "filter" and ARENT tagged with "Learning".

TonyM

unread,
Sep 17, 2018, 8:03:43 PM9/17/18
to TiddlyWiki
Captain Packers

Whilst it is often nice to combine filter terms into a single filter remember it is simple to nest list statements.

<$list filter="select a subset of tiddlers">,!-- no variable means the current tiddler is changed for each case-->
   <$list filter="[is[current]searchstring]]">,!-- no variable means the current tiddler is changed for each case, [is[current] uses the previous levels current tiddler in this filter-->
       The tiddlers meeting both filters criteria <<currentTiddler>> {{!!title}} {{!!caption}} etc...
   </$list>
</$list>

If you do use the variable=name in the list widget all you have to do is use "<variablename> in the filter and <$view widgets to display field content.

Regards
Tony

Captain Packers

unread,
Sep 18, 2018, 3:11:56 PM9/18/18
to TiddlyWiki
Awesome! Thanks guys. I'll give these a try and report back.

TonyM

unread,
Sep 18, 2018, 8:20:26 PM9/18/18
to TiddlyWiki
Captian,

Working from this discussion I created a tiddler for searching items with a tiddler-type field = reference where the search string is entered by the user.

Search All References <$edit-text tiddler="$:/config/References/searchstrings" field=all-reference-search placeholder="Enter search string" tag=input/>
<details><summary>Search Results</summary>


<$list filter="[tiddler-type[reference]search{$:/
config/References/searchstrings!!all-reference-search}]" emptyMessage="No results">


</$list>


</details>
Simply alter tiddler-type[reference] for your tags etc...

Regards
Tony
Reply all
Reply to author
Forward
0 new messages