List filter with field values question

106 views
Skip to first unread message

David Allen

unread,
Dec 4, 2015, 5:40:37 PM12/4/15
to TiddlyWiki
I'm not entirely certain how to describe what I'm trying to do, but here goes.

I've got a Star Trek fanfic wiki and I'd like to list which planets belong to certain empires by when they joined said empire.  I'm doing this through a series of historical event tiddlers so I can do some further stuff with the events.  Here are how my event tiddlers are currently set up:

Example 1:

[[Denobula]] joins the [[United Federation of Planets]]

Fields:
planet: [[Denobula]]
year: 2164
jointype: join

Example 2:

[[Xizholia]] is conquered by the [[Romulan Star Empire]]

Fields:
planet: [[Xizholia]]
year: 2329
jointype: conquer

What I'm doing so far is getting a list of planets that belonged to certain empires and compiling them in a list.

For example:
<$list filter="[tag[empire_event]tag[United Federation of Planets]]">

*{{!!planet}} ({{!!year}})
</$list>

This comes up as:

* Earth (2161)
* Denobula (2164)

What I'd like to do now is get a list of species that belong to certain empires using the planets listed in the event tiddler's planet fields.  Both the species tiddlers and the event tiddlers have planet fields, and I'd like to figure out how to return a list of species whose planet fields match the planet fields in a list of event tiddlers.  Does anyone know how to do this?  Thanks!

David Allen

unread,
Dec 28, 2015, 10:44:58 PM12/28/15
to tiddl...@googlegroups.com
Anyone?

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/xMp01NywG8o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/42f0ddc1-41fc-4f6f-a457-989f15a58ad5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
David Allen

David Allen

unread,
Dec 28, 2015, 11:56:10 PM12/28/15
to tiddl...@googlegroups.com
I've got this one mostly figured out now, except I can't figure out a way to compile the results into a single list, but as stated before, that may not be possible.

I've got the list that gets the events, then a list nested inside that that gets species whose planet fields are the same as the event's planet field.
--
David Allen

Tobias Beer

unread,
Dec 29, 2015, 4:58:16 AM12/29/15
to tiddl...@googlegroups.com
Hi David,

Actually built around musings over your super-galactic undertakings,
have a look at tobibeer/filter as announced here.

(I'd also be interested in your feedback as to how easy / difficult it was
for you to figure out what it's doing and how to adopt that to your needs.)

Please give feedback on the other thread as well,
so as to have a reference for a detailed, specific example
creating an awareness as to what it's actually good for / designed for.

Best wishes,

Tobias. 

Matabele

unread,
Dec 29, 2015, 11:24:29 PM12/29/15
to TiddlyWiki

Hi Allen

Filter expression runs can append new items to the current list -- if you already have filter expressions worked out, then this will build a single list:

filter ="+[add[more items]] +[and[more items]]"

If you wish to keep (and manipulate) the results in a field - you may instead use ActionListops widgets (nested within a Button widget):

<$action-listops $tiddler="Target" $field="mylist" $subfilter="+[filter[expression]]"/> //add more items
<$action-listops $tiddler="Target" $field="mylist" $subfilter="+[another-filter[expression]]"/> //and more items

regards
Reply all
Reply to author
Forward
0 new messages