Filter Operators Reading Connected Fields

Hi everyone,

I am trying to write a piece of code in TiddlyWiki, but it is not working as expected.

What I want to happen:
I want to look up the value of the “manager” field on the current tiddler, and then list all employee tiddlers that have that same manager name in their “supervisor” field.

What is actually happening:
The code breaks completely. It literally prints out the text [field:supervisor[{!!manager}]] on the screen instead of processing the filter and listing the tiddlers.

My code:

<ul>
<$list filter="[field:supervisor[{!!manager}]]">
<li><$link/></li>
</$list>
</ul>

What I have checked:

  • I verified my opening and closing brackets match.
  • I checked that my tiddler titles and field names are spelled correctly.

Could someone please point out what I am missing or doing wrong? Thank you!

wrong topic? :slight_smile:

sorry I can only provide a quick tip based on my limited knowledge and within this plugin scope (as currently it’s in my RAM indeed, so easier for me

Maybe first try to open dynamic $:/AdvancedSearch and play there?

<filter=“[tag[sub]billing-frequency[Quarterly]]”>

this snippet works for me in 5.4.0 - lists all sub tagged tiddlers (subscription) which are Monthly (this is a field) and shows their amount (this is also a field)

<ul>
<$list filter="[tag[sub]billing-frequency[Monthly]]">
  * <$link to=<<currentTiddler>>><<currentTiddler>></$link> — <$view field="amount"/>
</$list>
</ul>

The brackets that enclose a filter operator’s parameter value indicate how that parameter is to be parsed:

  • Square brackets are for literal text values
  • Angle brackets are for variable references
  • Curly brackets are for tiddler field references

Thus, since you are referencing the manager field of the current tiddler, the correct filter syntax is:

<$list filter="[field:supervisor{!!manager}]">

-e