@Marco10x15 when you are trying to delimit something such as “well done” inside a filter and it will interfere with the filters format
eg INCORRECT $tags="+[cycle[todo soon now maybe [[well done]] done]]" /> or your example
Move this value into a variable for example this works
\define cycle-values() todo soon now maybe [[well done]] done
\define cycle-actions()
<$action-listops $tiddler=<<currentTiddler>> $tags="+[cycle<cycle-values>]" />
\end
<$button actions=<<cycle-actions>> >cycle tag</$button>
Inside [cycle<cycle-values>] the set of values is now wrapped inside the variable, so the variable/macro can now include the delimiters for a title with a space [[well done]]
Ok, this is working for tags but the same code used for fields ends with a field filled with [[very low]] when I was searching to fill it with: very low.
With $action-setfield, starting with the field:myfield empty, the first press of the button fill the field with: very low, the second time with: very and then pressing the button has none effect.
ah!.. the problem is the enlist operator, which parses the two words “very low” as two separate input items precisely because they aren’t contained within [[ and ]].
The first time you press the button, {!!myfield} has no value, so cycle<states> defaults to using the first item in <states>, which is “very low”. Then, the 2nd time you press the button, because of enlist{!!myfield}, cycle<states> sees TWO values: “very” and “low”, and since “very” doesn’t match with any of the items in <states>, it just uses the first value from the input and sets myfield to “very”. From then on, it just gets “very” as input, and again, since that value doesn’t match with any of the items in <states>, it continues to result in “very” without changing.
The fix is to leave off the “enlist” operator (since the field value isn’t actually a list!). Try this: