I have this command (variable pp represents parentplace):
<$set name=trclass filter="[is[current]contains:place<pp>then[]else[highlight-row]]">
This is setting a variable named trclass (as in a table row class name. This commands works. However, I also want it to work if variable “pp” is not defined. So, my rules are:
if pp is not defined: trclass should be blank/empty string.
if pp is defined and contains in place field of the current tiddler then return blank/empty string.
if pp is defined and not contains in place field of the current tiddler then return “highlight-row”.
CoPilot came up with this:
<$set name=trclass
filter="[<pp>match[]then[]else[
[is[current]contains:place<pp>]
[is[current]!contains:place<pp>then[highlight-row]else[]]
]]">
…which I have not been able to get to work.
Thanks, any help would appreciated.
Craig