2014-04-10 18:56:51 +00:00
|
|
|
created: 20140410103123179
|
2015-01-19 19:37:26 +00:00
|
|
|
modified: 20150119192449000
|
2015-01-18 18:39:00 +00:00
|
|
|
tags: [[Filter Operators]] [[Common Operators]] [[Field Operators]]
|
|
|
|
title: has Operator
|
2014-04-10 18:56:51 +00:00
|
|
|
type: text/vnd.tiddlywiki
|
2015-01-18 18:39:00 +00:00
|
|
|
caption: has
|
|
|
|
purpose: filter the input tiddlers by field existence
|
|
|
|
|
|
|
|
<$macrocall $name=".operator-def"
|
|
|
|
syntax="has[f]"
|
2015-01-19 19:37:26 +00:00
|
|
|
input="a [[selection|Title Selections]] of tiddler titles"
|
2015-01-18 18:39:00 +00:00
|
|
|
parameter="the name of a field"
|
|
|
|
paramName="f"
|
2015-01-19 19:37:26 +00:00
|
|
|
output="the [[subselection|Title Selections]] of the input tiddlers that have a value in field <<.place f>>"
|
2015-01-18 18:39:00 +00:00
|
|
|
/>
|
2014-04-10 18:56:51 +00:00
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
<<.op has>> filters out both of the following:
|
2014-04-10 18:56:51 +00:00
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
* tiddlers that don't contain field <<.place f>>
|
|
|
|
* tiddlers in which field <<.place f>> exists but has an empty value
|
2014-04-10 18:56:51 +00:00
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
;Negation
|
|
|
|
: `!has` outputs the subset of the input tiddlers in which field <<.place f>> does <<.em not>> exist or does not have the value <<.place p>>.
|
2014-04-10 18:56:51 +00:00
|
|
|
|
2015-01-18 18:39:00 +00:00
|
|
|
<<.operator-examples "has">>
|