Hello all,
I have the following situation, but can't acheive my goal. What am I doing wrong here ?
I hav a Datatiddler containing country codes (abbreviations) as indices and a sort code as values, like this:
CZ:01
SK:02
HU:03
RO:04
SRB:05
I have a tiddler with a Select widget, where I let the user choose a country code.
The resulting code is correctly placed in the "country" field. So far so good.
Here's the catch:
I also would like to place the sort code in a seperate field of the same tiddler. But accessing the DataTiddler seems to work only when I use a hardcoded countrycode, like {{landcodes##RO}}.
But what I would like is: {{landcodes##<<land>>}}, or whatever way to get to the correct value. I have tried constructs with "<<", "$(", '"""$' but nothing seems to do the trick.
Any suggestions ?
Here is the contents of my test-tiddler:
-----
\define update-sort()
<$vars lnd={{!!land}} >
<$action-setfield $tiddler=<<currentTiddler>> $field="sort" $value={{landcodes##<<lnd>>}} />
</$vars>
\end
\define getLand()
<$select tiddler=<<currentTiddler>> field="land" actions=<<update-sort>> >
<$list filter='[[landcodes]indexes[]sort[title]]' listItem=selectedList >
<option value=<<selectedList>>><$view field='title'></option>
</$list>
</$select>
\end
<<getLand>>
-----