2018-11-16 11:27:19 +00:00
caption: subfilter
created: 20181031175129475
2022-01-09 14:44:19 +00:00
modified: 20211217135706478
2018-11-16 11:27:19 +00:00
op-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
op-neg-input: a [[selection of titles|Title Selection]] passed as input to the subfilter
op-neg-output: those input titles that are <<.em not>> returned from the subfilter <<.place S>>
op-output: the [[selection of titles|Title Selection]] returned from the subfilter <<.place S>>
op-parameter: a [[filter expression|Filter Expression]]
op-parameter-name: S
op-purpose: select titles from the operand interpreted as a [[filter expression|Filter Expression]]
2022-01-09 14:44:19 +00:00
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]] [[Selection Constructors: Conditional]]
2018-11-16 11:27:19 +00:00
title: subfilter Operator
type: text/vnd.tiddlywiki
2021-10-31 10:36:03 +00:00
<<.from-version "5.1.18">> Note that the <<.op subfilter>> operator was introduced in version 5.1.18 and is not available in earlier versions.
2018-11-16 11:27:19 +00:00
<<.tip " Literal filter operands cannot contain square brackets but you can work around the issue by using a variable:">>
```
<$set name="myFilter" value="[tag[one]]">
<$list filter="[all[tiddlers]subfilter<myFilter>]">
...
```
2020-10-06 18:20:03 +00:00
<<.tip "Compare with the similar [[filter|filter Operator]] operator which runs a subfilter against each title, returning those titles that return a non-empty list (and discards the results of the subfilter)">>
2021-10-31 10:36:03 +00:00
The <<.op subfilter>> operator will act as a [[constructor|Selection Constructors]] whenever the filter defined by its operand is a [[constructor|Selection Constructors]]. Otherwise, it will act as a [[modifier|Selection Constructors]].
2018-11-16 11:27:19 +00:00
<<.operator-examples "subfilter">>