I had actually tried using <$set>  except i was using it as:
   +[first[<rows>]]

I'm such a noob still.  I need to look for a 'TiddlyWiki for Outright 
Noobs' book to explain filters and when [] is and is not required.

Thank you for help. It is most appreciated.

  -- Kenn


On Wednesday, June 7, 2017 at 10:33:41 PM UTC-5, Mark S. wrote:
>
> Hello myst..
>
> As you've discovered, you can't insert a widget into the middle of a 
> filter. What you need to do is capture the index information you want 
> outside the <$list>, possibly via a <$set> widget, and then use value 
> inside of the <$list>. The following data and tiddler seems to work for me 
> --
>
> With data set $:/Data/testme :
>
> hind: 3
> hind1: A
> hind2: B
> hind3: X
> hind4: D
>
>
> and tiddler testme:
>
> \define mymacro(field)
> <$set name="rows" value={{$:/Data/$(currentTiddler)$##$field$}}>
>  <$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +[addprefix[$field$]] 
> +[first<rows>]" variable="idx">
> $(currentTiddler)$   
> <tr><td>
>     <$edit-text  tiddler="$:/Data/$(currentTiddler)$" index=<<idx>> tag=
> "input" />
>     </td></tr>
>   </$list>
> </$set>
> \end
>
> <<mymacro "hind">>
>
>
> Good luck,
> Mark
>
>
> On Wednesday, June 7, 2017 at 4:05:51 PM UTC-7, [email protected] wrote:
>>
>> I have a table of text-edit fields. and a variable that determines the # 
>> of rows.
>> All data is stored in a data tiddler. on first view, some indexes won't 
>> exist yet, so i can't do any fancy [indexes] filtering.
>>
>>
>>
>>   <$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
>> +[addprefix[$field$]] +[first[<$transclude 
>> tiddler="$:/Data/$(currentTiddler)$" index="$field$"/>]]" variable="idx">
>>    <tr><td>
>>     <$edit-text  tiddler="$:/Data/$(currentTiddler)$" index=<<idx>> 
>> tag="input" />
>>     </td></tr>
>>   </$list>
>>
>> What ends up rendering for me is:
>> (field == 'hind' which has a value of '6')
>> <$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +[addprefix[hind]] 
>> +[first[6]]" variable="idx"> 
>>
>> but i clearly should not be seeing the tag, it should be getting rendered.
>>
>> as a result, <<idx>> renders once and contains the json string contentds 
>> of the Data tiddler.
>>
>>
>> Is there a better way to do this? Am i missing something?
>>
>>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/578137b6-ff15-47ee-9c83-eb81df8c20bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to