the prefix +, it receives the filter output so far as its input; its output then replaces all filter output so far and forms the input for the next run
So [[a]] [[b]] +[join[, ], The plus says take all items we have so far and string them together, with ", " between each one, into one big item.
Just for the giggles, toss aside for later if confusing…
Try [[a b c d e]split].
That says "take the item with the title “a b c d e”, and split the tile into pieces, splitting the title wherever there is a " " (space.) Now we have a list of individual items a, b, c, d, e.
Next, try Try [[a b c d e]splitjoin]. That brings us a full circle back to one item: “a b c d e”
i guess what’s confusing is that up to now i’ve been under the impression that a filter must start with [ and end with ] but here it’s 3 different filters right? It’s as if there was an OR between them I guess. Except the last one forces the first two to pass through it.
One filter run is between [ and ]. Then the pieces inside of that make use of [ and ]. But you can’t next more square brackets in those.
[title[a b c d e]split[ ]join[ ]], that is one filter run. “title”, “split” and “join” are operators in that filter, and each operator has as a parameter wrapped in square brackets.
[title[a b c d e]split[ ]join[ ]] [title[f g h i j k]split[ ]join[ ]], that is a case of two filter runs, the resulting list of items from each run combined into one big list.
The problem with TiddlyWiki: too many filter operators.
I’m a minimalist. I toss aside what I consider unfortunate distractions.
Too large a vocabulary does a huge disservice to me. Some call it adding power, I call it unnecessary complexity in regards to learning, communications, documentation, and maintenance/debugging of TW instances.
I’ll only seek out and learn a new operator/feature when it hurts too much not to do that.
What I’ve found: 80% of what I want to do I can easily do with 20% of the plethora of features available.
The other 20% of the stuff I want to do, most of it I can easily do with the same 20% of the features.
It will involve more TW scripting steps, but I understand the steps, and I see clearly what is going on. They are the things I use all of the time, and never any once-in-a-blue-moon stuff I don’t remember how it works.
@Charlie_Veniot has done a wonderful job of explaining how the outer square braces delinitate a filter run.
Delinitating or delimiting something is matching the start and end of something.
eg; [[abba]prefix[a]] the outer [ ] delimits the beginning and end of a filter run, inside the filter run we could call [ ] a default delimiter, in this case we define a title with title[abba] or just [abba]. Only one title inside a filter run then looks like this [[abba]] or this [title[abba]]
However if you introduce a variable or field value they already come with their own delimiters, so we no longer need to use the [ ] for example we use <varname> or {!!fieldname}
[<varname>match{!!fieldname}] would test if the varname matchs the contents of the fieldvalue (on the current tiddler).
You will notice we only need one < > or { } inside filters.
You can also use {tiddlername} which defaults to the text field {tiddlername!!text}
Outside filters, in Wiki text, we have to use doubles << >>{{ }} in part to set them apart from other braces in html such as <div> </div> which use the single < > already.
Proceed below once you feel comphortable with the above
A nice little automatic feature in filters is fieldname[value] for example show-details[yes] will return a value/ be true if the fieldname show-details has the value yes.
Notice this show-details[yes] is effectively the same as [title[abba]]
Recent versions also allow macro’s in filters, which are just variables anyway <now YYYY0MM0DD>, put this inside a filter run and rather than use the whole $list widget, we can put the filter in a triple curly braces, or a “filtered transclusion” as follows, {{{ [<now YYYY0MM0DD>] }}}
Tripple braces / filtered transclusions
You will see a lot of us using “filtered transclusion”s to test out filters or demonstrate how a filter works.
Be aware however if “filtered transclusion”s are used as a parameter such as paramname={{{ filter }}} only the first result is assigned to the parameter.