Folks it is quite common to want to alter the results of a filter, the most common may be altering the sort order, or field on which to sort, or adding the negation !.
I know there are a number of ways to do such a parametised sort, and I am not asking for those here, but I want us to discuss the idea of constructing filters before we use them. A common way would be using backticks as an attribute, when defining a variable to be used as a filter, or on a filter= parameter as an attribute value. Or even the deprecated define, or new substitute operator.
I have long thought we could as a community develop a shared “best practice” for programmatically defining and constructing filters, before their use.
Filters are so important to TiddlyWiki and there are numerous tips and tricks available out there, but when one goes beyond correcting filters, or sharing self contained filters, it is difficult to research and publish filter tricks without having to build a full and precise filters and examples.
- For example consider the use of this in a function to turn it into a list
+[format:titlelist[]join[ ]]it can just be appended to a filter but what if it was only a sub filter.
Some authors and many users would love to have written guides on how to construct filters, beyond the per operator documentation, including dial on demand filter generation to use in our “TiddlyWiki Script”. Until we have a collection of methods to handle constructing filters we cant progress this much further. This would help the community;
- write interactive filter generations tools
- provide more sophisticated documentation and interactive lessons.
- Communicate more readily when supporting complex filter problems.
So to be clear this is a meta view of constructing filters, to subsequently use as filters.
