1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-22 21:33:14 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/each.tid
Tobias Beer ef3e44eb48 rename suffix each:list to each_list-item
based on #1422, improves readability of the filter expression

tests passed
2015-11-13 11:07:24 +01:00

24 lines
1.0 KiB
Plaintext

created: 20140410103123179
modified: 20150203184257000
tags: [[Filter Operators]] [[Group Operators]]
title: each Operator
type: text/vnd.tiddlywiki
caption: each
op-purpose: select one of each group of input titles by field
op-input: a [[selection of titles|Title Selection]]
op-suffix: optionally, `list-item`
op-parameter: the name of a [[field|TiddlerFields]], defaulting to <<.field title>>
op-parameter-name: F
op-output: a selection containing the first input title encountered for each distinct value of field <<.place F>>
Each input title is processed in turn. The value of field <<.place F>> in the corresponding tiddler is examined.
;each
:As long as the field's value has not been encountered before, the title is appended to the output.
;each:list-item
:The value is treated as a [[title list|Title List]]. Each title in the list considered in turn. If it has not been encountered before, it is appended to the output.
If a tiddler doesn't contain field <<.place F>>, it is treated as if the field's value was empty.
<<.operator-examples "each">>