There's at least 2 mistakes in your code. But it's easy to make mistakes in
the quasi-documented world of TW macros, parameters, transclusions ...
This:
<$set name="fieldvalue" value="<$view field=$field$/>">
isn't doing what you think it's doing. It's not assigning the value of the
view to fieldvalue. It's assigning a string that gets passed on as "<$view
field=$field$/>" which in turn gets processed on #3 and LOOKS like it's
doing what you want. But what you want is (or probably is):
<$set name="fieldvalue" value={{!!$field$}}>
In the filter operator, this:
<$list filter="[field:$field$[<fieldvalue>]]">
should be
<$list filter="[field:$field$<fieldvalue>]">
Notice that the angle brackets replace one set of square brackets.
Good luck!
Mark
On Wednesday, March 29, 2017 at 12:40:23 PM UTC-7, Steven Schneider wrote:
>
> I'm trying to, well, here's the code:
>
> A > I define a macro fpnl (eventually, first previous next last) that
> accepts a tiddler (usually, <<currentTiddler>> and a field that has a value
> B > I am trying to generate a link to the first & last & next & previous
> tiddler that shares the value on the specified field with the currentTiddler
> C > right now, I can not get the list filter to work with the field and
> value variables. Obviously, my mistake is in the filter line (between 3 & 4
> below). I've tried:
>
> [field:$field$<fieldvalue>]
> [field:$field$[<fieldvalue>]]
> [field:$field$[<<fieldvalue>>]]
>
> Any suggestions?
>
>
> \define fpnl(tiddler field)
> 1 tiddler: <<currentTiddler>><br>
> 2 field: $field$<br>
> <$set name="fieldname" value=$field$>
> <$set name="fieldvalue" value="<$view field=$field$/>">
> 3 value of $field$: <<fieldvalue>><br>
> <$list filter="[field:$field$[<fieldvalue>]]">
> 4 <<currentTiddler>><br>
> </$list>
> </$set></$set>
> \end
>
> <$macrocall $name="fpnl" tiddler=<<currentTiddler>> field="season"/>
> ``(with current tiddler having field season=winter)
> ``
>
>
> Thanks,
>
> //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 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/e447af86-4d4b-4c07-96e8-7404453f9081%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.