I have a tiddler that attempts to show a list of all “event” tiddlers shared by two “person” tiddlers.
So, given two people John Smith and Susan Wilson I want to list all events that they share.
Event tiddlers have a “people” title field. In this simple case the following filter works (where is a variable of person 1 and is a variable of person 2):
[tag[event]contains:people<p1>contains:people<p2>]
I also have an “event-role” tiddler. This is used to associate people to an event with a role. These tiddlers define the role this person had in the event. It has two title fields: “event” (title field of the event) and “people” (title field lists all people with this role in the event). Therefore, getting the shared events is a bit more complicated.
The following filter gets all the shared events within the same role (this works).
[tag[event-role]contains:people<p1>contains:people<p2>get[event]enlist-input[]]
Then I wanted to get a list of events of people in the event tiddler vs those found in an event role. I first wrote this, but it did not work:
[tag[event]contains:people<p1>tag[event-role]contains:people<p2>get[event]enlist-input[]]
For some reason I elected to reverse the filter logic to the following (and found this did worked):
[tag[event-role]contains:people<p2>get[event]enlist-input[]tag[event]contains:people<p1>]
Why?
I suspect it is something to do with my usage of the “get”.
Is it because it is performing the “get” operator on both the “tag[event] and tag[event-role]”? If so, things get more complex with my next step…
My next step was to get shared events where the two people are found in different “event-role” tiddlers:
[tag[event-role]contains:people<p1>get[event]enlist-input[]tag[event-role]contains:people<p2>get[event]enlist-input[]]
And, this does not work either.
Any ideas? Thank you,
Craig