<$list filter="[has[xxx]]">
</$list><$list filter="[has:filed[xxx]]">
</$list>You have answered your own question. That is the difference. Both return nothing if a field does not exist, thus emptyValue or emptyMessage return values. With this behaviour you can test all three posibilities. The field[] operator is not so comprehencive.
I think of has[fieldname] as has value, and
has:field[fieldname] as has field or value.
If the fieldname does not exist neither of the above work
Using the Not (need to test)
!has[fieldname] No fieldname at all
!has:field[fieldname] No fieldname at all
Regards
Tony
Thanks Tony!So a third case is no-existed filed where both cases result nothing!
has:field[fieldname] and has:filed[] do different things. The second checks the existence of a field named filed.
https://tiddlywiki.com/#has%20Operator
All the best,
Thomas
| purpose | filter the input by field existence |
|---|---|
| input | a selection of titles |
| suffix | F = NEW IN: 5.1.14 optionally, the name of a field |
| parameter | F = the name of a field |
| output | without suffix or with suffix value» those input tiddlers in which field F has a non-empty valuesuffix field» those input tiddlers in which field F exists |
! output | without suffix or with suffix value» those input tiddlers in which field F does not exist or has an empty valuesuffix field» those input tiddlers in which field F does not exist |