\define fieldnames()
<$list filter="[list[!!fieldnames]]" variable=eachfield>
<$list filter="[is[current]!has[<eachfield>]]" variable=null>
<$button>
<$action-setfield $field=<<eachfield>> $value=" "/>
+
</$button>
</$list>
<$list filter="[is[current]has[<eachfield>]]" variable=null>
<$button>
<$action-deletefield $field=<<eachfield>>/>
-
</$button>
</$list>
<<eachfield>>
</$list>
\endCan anyone tell me why I am seeing both the + and the - Button here, and why the "has" and "!has" is not working?
\define fieldnames()
<$list filter="[list[!!fieldnames]]" variable=eachfield>
<$list filter="[is[current]!has[<eachfield>]]" variable=null>
...
</$list>
<$list filter="[is[current]has[<eachfield>]]" variable=null>
...
<$list filter="[is[current]!has<eachfield>]" variable=null><$list filter="[is[current]has<eachfield>]" variable=null>As I see it.
In this context current is a litteral that was placed into the filter unlike <name> which will be replaced before evaluating the filter.
I understand that is current becomes the current tiddler makes it look less like a litteral but in the filter string between the quotes it is litteral.
Regards
Tony
Just to get this clear in my mind:
You indicated that the square brackets in filter expressions contain literal values. How does this relate to the "is[current]" term? Would you consider the tiddler category "current" is a literal?
<<list-links "[is{!!filterfield}]">>
or
<$vars filtervar={{!!filterfield}}">
<<list-links "[is<filtervar>]">>
</$vars>Is there any reason we can't have
Is[field] ?
I am currently building additional field handling which allows fields as Tiddlers just as we can have tags as Tiddlers.
I thought I saw some fields appearing after creation as system tiddlers somewhere but can't locate them again.
Regards
Tony