Hi everybody,
the struggle to get TW do what I want it to do goes on hopelessly.
I have a database of systems described by one data tiddler each, like this:
system_1
tag: system
feature 11: Y/N
feature 12: Y/N
feature 13: Y/N
feature 14: Y/N
system_2
tag: system
feature 21: Y/N
feature 22: Y/N
feature 23: Y/N
feature 24: Y/N
as you can easily guess, the tiddlers record what features system X supports or not.
Now I want to flexibly query my database for a certain feature, so I came up with this code:
\define check_feature(feature) [getindex[$feature$]trim[]match[Y]]
<$set name=āhas_featureā value=<$macrocall $name=ācheck_featureā feature=āIFTTTā/> >
-
<$list filter="[tag[system]filter]" variable="sys">
- <$link to=<>> <>
</$set>
(in the example above Iām checking which systems are supported by IFTTT as you can imagineā¦). Fair enough, the above code DOESNāT work, because you cannot put a <$macrocall> widget as right-side element of the āvalueā element of a <$set> widget. Ok, so how do I go? I know I could instead write:
<$set name=āhas_featureā value=<<check_feature IFTTT>> >
and that would work, but I need to use the <$macrocall> widget because the next step is to make the āfeatureā parameter dynamically chosen via a <$select> instruction, so I would need to call the macro as below:
<$macrocall $name=ācheck_featureā feature={{!!current_chosen_feature}}/>
where of course field ācurrent_chosen_featureā wouldbe set by the <$select> widget.
Thanks in advance for helping. More and more TW seems to me like a too much beautiful, too much independent woman: you love her but you cannot make her listen to youā¦