How to count two parameters in count widget?

144 views
Skip to first unread message

HC Haase

unread,
Oct 20, 2016, 5:28:20 AM10/20/16
to TiddlyWiki
How to count two parameters in count widget?
I want to count tiddelers with a tag (xx) and all that is tagged with these tags. In the filter search this works.

[tag[xx]tagging[]] [tag[xx]]



But in the count widget it don't. 

<$count filter=[[tag[xx]tagging[]][tag[xx]]]/>


whats the correct syntax?

Jed Carty

unread,
Oct 20, 2016, 5:34:04 AM10/20/16
to TiddlyWiki
You need to replace the [ and ] you have around the whole filter with quotes.

try this:

HC Haase

unread,
Oct 21, 2016, 4:27:01 AM10/21/16
to TiddlyWiki
Thanks, that did it!

However that gave me some new trouble. I Also want to do the opposite count. So I figured I could do it with a the negative prefix !, like

<$count filter="[!is[system]!tag[xx]!tag[xx]tagging[]]"/>

(I want a count of tiddlers that is not system, not taged xx or tagged with a tiddler that is taged with xx)

But it gives me a wrong/unexpected result. it count around 30 tiddlers to much (ap 6% in my case).


Jed Carty

unread,
Oct 21, 2016, 5:08:11 AM10/21/16
to TiddlyWiki
It is probably easier to use

[all[]]-[tag[xx]tagging[]][tag[xx]]



as the inverse of the filter you had before.

HC Haase

unread,
Oct 25, 2016, 6:48:28 AM10/25/16
to TiddlyWiki
thanks
with a bit of experimentation I got it to work for my case
 like:


[all[]]-[tag[xx]tagging[]]-[tag[xx]]

Uwe

unread,
Nov 6, 2017, 4:34:17 PM11/6/17
to TiddlyWiki
With this, I get a different (better?) result:

<$count filter="[all[]] -[tag[xx]]"/>

HTH
Reply all
Reply to author
Forward
0 new messages