1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-05 17:46:19 +00:00

Add docs for "field" filter operator

Fixes #588
This commit is contained in:
Jermolene 2014-04-28 12:54:34 +01:00
parent 5fa6d001f8
commit d49495ab73

View File

@ -4,17 +4,12 @@ tags: filters commonfilters
title: FilterOperator: field
type: text/vnd.tiddlywiki
The ''field'' filter operator filters the current list to leave only the first tiddler that has a distinct value for a specified date field.
The ''field'' filter operator filters the current list according to whether a field matches a specified value.
For example:
The operand is the value to match, and the suffix is used to identify the field. For example:
|!Filter String |!Description |
|`[eachday[created]]` |Returns a list of the first tiddler created on each distinct day |
|`[field:modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston |
|`[modifier[JeremyRuston]]` |Returns a list of the tiddlers created by `JeremyRuston |
The ''eachday'' operator can be used to group tiddlers. For example, the following wiki text creates a list of the number of tiddlers that were modified on each day:
<$list filter="[!is[system]eachday[modified]!sort[modified]]">
<$view field="modified" format="date" template="DD MMM YYYY"/>: <$count filter="[sameday{!!modified}]"/> modifications
</$list>
Note that if an unknown filter operator `[unknown[xxx]]` is encountered it is interpreted as `[field:unknown[xxx]]`.