Thank you very much for this Jeremy.
With the corrected syntax, {{!!my-field-name}}, the field transclusions are
derived from the current tiddler that's understood as the very tiddler that
has the macro and the transclusions themselves (the 'dashboard' tiddler in
my original description). I'm aware that this is expected behaviour.
What I would need is transclude the fields of other tiddlers ('tracker'
tiddlers), without explicitly specifying those tiddlers' names -- the name
should be provided by the list filter:
<$list filter="[tag[tracker]] +[sort[name]]">
This is why I was trying to use <currentTiddler> as I was hoping to
transclude the fields of a <currentTiddler> that's currently listed by the
list filter.
When I transclude fields using <currentTiddler> within the above list
filter, the respective fields are transcluded correctly but when I use
<$set> within the above list filter, the set values are no longer available
to the macro that's defined outside of the above <$list></$list>.
I'm sorry if that's a bit convoluted way of thinking, I'm still learning TW
and though I've been experimenting a lot, I'm still making many basic
mistakes in the process. That said, I'm amazed at what TW can do. Thank you
Jeremy for creating and maintaining such an amazing tool!
@PMario, thanks for your suggestions, they definitely sound interesting.
I'll experiment with them in the future; unfortunately they don't seem to
help in my use case.
Best regards,
Hubert
On Friday, 3 November 2017 12:14:07 UTC, Jeremy Ruston wrote:
>
> Hi Hubert
>
> On 3 Nov 2017, at 10:34, hubertgk <[email protected] <javascript:>> wrote:
>
> <$set name=currentVal value={{<currentTiddler>!!tracker_current_value}}>
> <$set name=targetVal value={{<currentTiddler>!!tracker_target_value}}>
> <$set name=tracker_start_date value={{<currentTiddler>!!
> tracker_start_date}}>
> <$set name=tracker_end_date value={{<currentTiddler>!!tracker_end_date}}>
>
>
> That’s the wrong syntax for transcluding a field from the current tiddler.
>
> The syntax for a transcluded attribute allows for the following
> possibilities when transcluding from a tiddler field:
>
> {{MyTiddlerTitle!!my-field-name}}
> {{!!my-field-name}}
> {{MyTiddlerTitle}}
>
> In the first case, both the tiddler and the field are specified. In the
> second case, the tiddler isn’t specified and so defaults to the value of
> the currentTiddler variable. And in the third case, the field isn’t
> specified and so defaults to “text”.
>
> So, perhaps try:
>
> <$set name=currentVal value={{!!tracker_current_value}}>
> <$set name=targetVal value={{!!tracker_target_value}}>
> <$set name=tracker_start_date value={{!!tracker_start_date}}>
> <$set name=tracker_end_date value={{!!tracker_end_date}}>
>
> Best wishes
>
> Jeremy.
>
>
--
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/67ebd680-0d24-4798-aece-c7f21472d80b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.