You have two left-angle-brackets in front of "<<option" in example 3. Could
be a simple syntax error (I hate those syntax gremlins).
Best, Josh F
On Monday, April 27, 2020 at 2:13:14 PM UTC-7, Steven Schneider wrote:
>
> 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.
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/234b5955-4d7f-4b35-92c3-58f92f6e7320%40googlegroups.com.