In #3 you put the select output into $:/perspective, which is also what you 
set in #1.

So I'm confused. Do you want the user to make a choice of perspective in 
#1, and THEN choose a field in #3, or were you hoping to choose both 
perspective and artifact in #3 at the same time?

In #3, as a starter, it looks like there is a mismatch between <$list> and 
</$list> (one extra </$list>.) though maybe my eyes are missing something.

Good luck!

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/273e312a-4bf8-4d75-99ef-df0961739b46%40googlegroups.com.

Reply via email to