A Filter problem

180 views
Skip to first unread message

Luis Gonzalez

unread,
Jul 30, 2019, 4:04:42 AM7/30/19
to TiddlyWiki
I have two list:

  • All scenes:
<$list filter="[tag[scene]]"/>

  • All scenes included in a story:
<$list filter="[tag[scene]tags[]!prefix[scene]]" variable="tagName">
<$list filter="[tag<tagName>]" variable="scene" >
<$link><<scene>></$link><br/>
</$list>
</$list>




How can I get all tiddlers of the first list not included in the second list?


P.S: A scene is tagged with "scene" tag and with the story in which is included. So, a story is a tag for scenes. I need all scenes not included in any story.

Jed Carty

unread,
Jul 30, 2019, 4:44:52 AM7/30/19
to TiddlyWiki
Try this:

<$list filter="[tag[scene]tags[]] -scene" variable="tagName">
<$list filter="[tag<tagName>!tag[scene]]" variable="scene" >

<$link><<scene>></$link><br/>
</$list>
</$list>

Jed Carty

unread,
Jul 30, 2019, 4:45:58 AM7/30/19
to TiddlyWiki
Sorry, I read that backwards. My last post didn't answer your question. What you are asking for may take a bit of time to figure out, I need to think about it a bit.

Jed Carty

unread,
Jul 30, 2019, 4:55:37 AM7/30/19
to TiddlyWiki
This one may actually answer your question:

<$list filter='[tag[scene]get[tags]!field:title[scene]]'>
<$list filter='[field:tags<currentTiddler>]'>

</$list>
</$list>

I feel like there should be a more concise way to do this, but it should work.
Message has been deleted

Luis Gonzalez

unread,
Jul 30, 2019, 7:07:14 AM7/30/19
to tiddl...@googlegroups.com
I'm affraid this does not work.


I have attached my tiddlywiki. It's in Spanish:
  • historia = story
  • escena = scene
In the right zone, under Escenas  (scenes) I need to show only the scenes  not included in any story
plan1.html

Mat

unread,
Jul 30, 2019, 7:35:29 AM7/30/19
to TiddlyWiki
Luis, please give some examples like so

title:a
tag:scene

title:b
tag:scene

title:c
tag:scene

title:d
tag:somethingelse

etc

...and then show the resulting lists you want.


Also, make sure your attached file makes it easy to help you. You should put the critical tiddlers so that they show immediately so the helper doesn't have to figure out the name of that tiddler hidden in the sidebar tab. 

<:-)

Luis Gonzalez

unread,
Jul 30, 2019, 8:03:05 AM7/30/19
to TiddlyWiki
Stories
story A. Tagged: "story"
story B. Tagged: "story"

Scenes
scene 1. Tagged: "scene" and "story A"
scene 2. Tagged: "scene" and "story A"
scene 3. Tagged: "scene" and "story A"

scene 4. Tagged: "scene" and "story B"
scene 5. Tagged: "scene" and "story B"

scene 6. Tagged: "scene"
scene 7. Tagged: "scene"


I need a fitler to show only "scene 6" & "scene 7"

Notes
  • All (stories and scenes) are tidlers.
  • The free scenes are "scene 6" and "scene 7". They don't belong to any story.
  • The story A has the scenes 1, 2 & 3
  • The story B has the scenes 4 & 5
Thanks!!

Mat

unread,
Jul 30, 2019, 8:25:55 AM7/30/19
to TiddlyWiki
[tag[scene]] -[tag[story]tagging[]]

<:-)

Luis Gonzalez

unread,
Jul 30, 2019, 10:31:39 AM7/30/19
to TiddlyWiki





I have hundreds of code lines without any result and.....

... with a line you solve it.


Millions of thanks. If I can help you, tell me.


Now I know than I still have to learn a ot about tiddlywiki.

Mat

unread,
Jul 30, 2019, 10:45:06 AM7/30/19
to TiddlyWiki
Haha. I learnt that particular filter combination not long ago myself (from fellow Xavier)

 
If I can help you, tell me. 

If you like TW, tell others about it - that helps us all.

<:-)

Luis Gonzalez

unread,
Jul 31, 2019, 2:19:42 AM7/31/19
to TiddlyWiki

I think tiddlywiki is like a book of magic.

There are clumsy wizards like me that spend all morning preparing spells without any result. And skilled magicians with high domain or this tw magic that get amazing results.



I encourage all clumsy wizards!

Mohammad

unread,
Jul 31, 2019, 5:09:08 AM7/31/19
to TiddlyWiki
Added to TW-Scripts

TonyM

unread,
Jul 31, 2019, 9:24:34 AM7/31/19
to TiddlyWiki
Mat

This deceptively powerful but simple filter pattern is very powerful when both parts contain bimlas's kin operator. One may list all the descendants of grandfather less all the descendants of my parent and the result can list the cousins.

Tony

Reply all
Reply to author
Forward
0 new messages