Hi all, I've got a challenge, trying to get a filtered list matching a field value into a select.....
I can do the filter! Just can't get it into the select.
the attached json file contains 3 tiddlers tagged "perspective" and 3 tiddlers tagged "artifacts", with some of the perspective tiddlers having fields whose names matches the title of an artifacts tiddler and whose value is "Yes", plus a tiddler named demo that has code. this works in tiddlywiki.com....
1. Select among a set of tiddlers matching a filter, tag[perspective]]:<br>
<$select tiddler='$:/perspective'>
<$list filter="[tag[perspective]]">
<option value=<<currentTiddler>>><<currentTiddler>></option>
</$list>
</$select>
<hr>
Selected tiddler is <$link to={{$:/perspective}}/><br>
2a. List tiddlers matching tag[artifact]].......
<$list filter="[tag[artifact]]">
<<currentTiddler>><br>
</$list>
2b .....whose tiddler title match a field name with a field value of "Yes" in the selected perspective tiddler.
<$list filter="[tag[artifact]]">
<$vars fieldName={{!!title}} fieldValue="Yes">
<$list filter="[title{$:/perspective}has<fieldName>]">
<$list filter="[<currentTiddler>get<fieldName>match<fieldValue>]" variable="is_match">
{{$:/perspective}} has <<fieldName>> with value of <<fieldValue>><br>
</$list>
</$list>
</$vars>
</$list>
<hr>
3. Put that list in a ``<$select>`` -- no such luck!
<$select tiddler='$:/perspective'>
<$list filter="[tag[artifact]]">
<$vars fieldName={{!!title}} fieldValue="Yes">
<$list filter="[title{$:/perspective}has<fieldName>]">
<$list filter="[<currentTiddler>get<fieldName>match<fieldValue>]" variable="is_match">
<<option value=<<fieldName>>><<fieldName>></option>
</$list>
</$list>
</$vars>
</$list>
</$list>
</$select>
<hr>
Any suggestions, much appreciated,
//steve.