Showing wherever value is listed, across many fields...?

Suppose I have event tiddlers with various team-name fields — neatly prefixed with @ — which function as list fields for participants. (Relation of participants to teams is not simple and fixed across events.)

In the tiddler for Heidi (and for every other potentially-listed individual, based on a template), I’d like to be able to display a date-sorted overview of all the events in which Heidi is listed (in any @xxx field) AND, for each event-tiddler that does list Heidi (in any of the @xxx fields), to specify WHICH field (which team) is listing her.

(There shouldn’t be duplicates within an event, but I’d like an event to show up twice – specifying each @xxx field in which she’s listed – if Heidi did somehow show up on two team rosters for the same event, to help troubleshoot any data-entry error.)

Surely this is possible? I’ll spare you all the details of what I’ve tried. I seem to be able to get bits and pieces, but not the whole package.

Many thanks if anyone’s willing to chime in!

Try this:

First, create a tiddler named “PersonTemplate”, containing:

<$let person={{!!title}}>
<$list filter="[fields[]prefix[@]]" variable="fieldname">
   <$list filter="[all[]] :filter[get<fieldname>enlist-input[]match<person>] :sort:date[{!!eventdate}] ">
      <$link/> in <<fieldname>> on 
      <$text text={{{ [{!!eventdate}addsuffix[120000000]format:date[DDD, MMM DDth YYYY]] }}}/><br/>
   </$list>
</$list>
</$let>
{{||$:/core/ui/ViewTemplate/body/default}}

Next, create a tiddler named “PersonTemplateFilter”, tagged with $:/tags/ViewTemplateBodyFilter, containing:

[tag[person]then[PersonTemplate]]

Also add a list-before field (with a blank field value) to this tiddler so it will be processed first by the ViewTemplateBodyFilter cascade.

Then, create a tiddler named “Heidi”, tagged with “person”.

Notes:

  • I assumed that each event tiddler has a field called eventdate with a date value using YYYYMMDD format.

Thanks!

I’ve followed this recipe (with some modifications related to my setup, but which are distractions from current question), and my resulting list is still getting initially sorted by TEAM (the date-sort is only effective within each team batch); I’m not able to get the result to appear properly sorted by date yet. :thinking: I’ll keep tinkering.

I think I’ve got it solved.

The trick is that my widest <$list> frame has to be for the events (dates), since that’s the overall sort I’m seeking. I need that list to be generated with a variable to track that date (which I’m calling “session”), so I can reset the currentTiddler before next steps…

Then within each event, I use the double-list structure you invoked (first, the @xxx fieldnames list with variable, then the events such that thisTiddler is listed (checking under each of those fieldnames) and the date matches <<session>>).

Thanks again @EricShulman, your nudge got me started along the right path!