List Info

Thread: ForEachTiddler: show Tiddlers without matching tag




ForEachTiddler: show Tiddlers without matching tag
country flaguser name
United States
2007-10-19 09:40:35
This is probably a simple Javascript question:

Using the ForEachTiddler plugin, if I wanted to list all the
tiddlers
that have a tag, for example, Work, I would use

'tiddler.tags.contains("Work")' with the where
clause

What if I wanted to see exactly the opposite, i.e. all
tiddlers that
do NOT contain the Work tag?

Thank you


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWikigooglegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: ForEachTiddler: show Tiddlers without matching tag
country flaguser name
United States
2007-10-19 09:57:03
> 'tiddler.tags.contains("Work")' with the
where clause
> What if I wanted to see exactly the opposite, i.e. all
tiddlers that
> do NOT contain the Work tag?

In javascript, preceding a boolean (true/false value) with
a
"!" (exclamation point) inverts the value,
changing "true" into
"false" (or "false" into
"true").  Thus, for your use-case, simply add
a ! immediate preceding "tiddler...", like this:

'!tiddler.tags.contains("Work")'

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWikigooglegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: ForEachTiddler: show Tiddlers without matching tag
country flaguser name
United States
2007-10-19 10:04:56
Thanks Eric, that works perfectly!

- tas

On Oct 19, 10:57 am, Eric Shulman <elsdes...gmail.com> wrote:
> > 'tiddler.tags.contains("Work")' with the
where clause
> > What if I wanted to see exactly the opposite, i.e.
all tiddlers that
> > do NOT contain the Work tag?
>
> In javascript, preceding a boolean (true/false value)
with a
> "!" (exclamation point) inverts the value,
changing "true" into
> "false" (or "false" into
"true").  Thus, for your use-case, simply add
> a ! immediate preceding "tiddler...", like
this:
>
> '!tiddler.tags.contains("Work")'
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "TiddlyWiki" group.
To post to this group, send email to TiddlyWikigooglegroups.com
To unsubscribe from this group, send email to
TiddlyWiki-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )