Hi Hubert

Apologies, I’m struggling a little to understand what you’re trying to do, and 
the context for the original code. Perhaps you could post an absolutely minimal 
test case that illustrates what you’re trying to do? The code in the original 
post has a bunch of styling etc. that gets in the way of understanding it, and 
it looks like it might be incomplete (eg there’s no closing </$set>).

Perhaps the problem is just that you want to set the variables curentVal, 
targetVal etc. such that they can be accessed within the Updated_status macro? 
If so, you should be able to wrap set widgets around the <$button> widget 
within the Button macro.

One little thing I noticed trying to read your original code is that you’ve got 
a macro:

\define CurrentTiddler()
<<currentTiddler>>
\end

But then you are invoking it via text substitution:

<$action-setfield $tiddler="_data000" $index=$(CurrentTiddler)$ 
$value=$(Updated_status)$/>⥁Status</$button>

Because there’s no wikification done during text substitution, that is 
equivalent to:

<$action-setfield $tiddler="_data000" $index=<<currentTiddler>> 
$value=$(Updated_status)$/>⥁Status</$button>

Best wishes

Jeremy


> On 3 Nov 2017, at 13:01, hubertgk <[email protected]> wrote:
> 
> 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 <hube...@ <>gmail.com <http://gmail.com/>> 
>> 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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <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
>  
> <https://groups.google.com/d/msgid/tiddlywiki/67ebd680-0d24-4798-aece-c7f21472d80b%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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/5C06DA27-FFA0-4D8C-AB79-0C5E826C3401%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to