This page is part of a static HTML representation of the TiddlyWiki at http://tiddlywiki.com/

Filter Operators

17th October 2016 at 4:40pm
Filters

A filter operator is a predefined keyword attached to an individual step of a filter. It defines the particular action of that step.

Important: Each first step of a filter run not given any input titles receives the output of [all[tiddlers]] as its input.

The following table lists all core operators, the most common ones marked ✓. The last column indicates whether an operator allows negation using the ! prefix. For specifics as to each operator's negated output please refer to its documentation.

Operator Purpose !
all find all titles of a fundamental category
backlinks find the titles that link to each input title
count count the number of entries in a list
days filter the input by date !
each select one of each group of input titles by field
eachday select one of each group of input titles by date
enlist select titles from the operand interpreted as a title list !
field filter the input by field !
fields select all field names of the input titles
get select all values of a field in the input titles
getindex select all values of a data property in the input titles
has filter the input by field existence !
haschanged filter the input by tiddler modification status !
indexes select all data properties of the input titles
is filter the input by fundamental category !
links find the titles linked to by each input title
list select titles via a list field !
listed find the titles that list the input titles
minlength filter items shorter than the specified minimum length
regexp filter the input by pattern-matched field !
sameday filter the input by date
search filter the input by searching tiddler content !
title select a single title !
Order Operators
after find which input title follows a specified one
before find which input title precedes a specified one
bf same as rest
butfirst same as rest
butlast discard the last N input titles
first select the first N input titles
last select the last N input titles
limit select the first or last N input titles !
next find which titles in a list field follow the input ones
nsort sort the input by number field !
nsortcs sort the input titles by number field, treating upper and lower case as different !
nth select the Nth input title
order selectively reverse the input list
previous find which titles in a list field precede the input ones
rest discard the first N input titles
reverse reverse the order of the input titles
sort sort the input by text field !
sortcs sort the input by text field, treating upper and lower case as different !
Listops Operators
allafter discard all items except those after the marker
allbefore discard all items except those before the marker
append append a range of items from an array to the list
insertbefore insert an item T into a list immediately before an item B
move move marker N places in the list
prepend prepend a range of items from an array to the list
putafter move N trailing items after the marker
putbefore move N trailing items before the marker
putfirst move N trailing items to the head of the list
putlast move N leading items to the tail of the list
remove remove a list of titles specified in the operand from the input
replace replace marker with N trailing items
sortby sort the current list in the order of the list referenced in the operand
String Operators
addprefix extend each input title with a prefix
addsuffix extend each input title with a suffix
decodehtml apply HTML decoding to a string
decodeuri apply URI decoding to a string
decodeuricomponent apply URI component decoding to a string
encodehtml apply HTML encoding to a string
encodeuri apply URI encoding to a string
encodeuricomponent apply URI component encoding to a string
escaperegexp escape special characters used in regular expressions
prefix filter the input titles by how they start !
removeprefix filter the input titles by how they start, deleting that prefix
removesuffix filter the input titles by how they end, deleting that suffix
splitbefore select a delimited prefix from each input title
stringify apply JavaScript string encoding to a string
suffix filter the input titles by how they end !
Tag Operators
tag filter the input by tag !
tagging find the tiddlers that have the input tags
tags select all tags of the input tiddlers
untagged discard any input titles that have tags !
Special Operators
commands select the titles of all the Node.js commands
editiondescription select the descriptions of the input editions
editions select the names of all the TiddlyWiki editions
modules select the names of all modules of the input module types
moduletypes select the names of all TiddlyWiki module types
plugintiddlers select all shadow titles in the input plugins
shadowsource select the plugin titles that contain the input shadows
storyviews select the names of all the story views

A typical step is written as [operator[parameter]], although not all of the operators need a parameter.

Most steps process the selection of titles that are supplied as their input, but a few construct an entirely new selection instead. For the exact rules, see Filter Syntax.