macros (except js ones) are a type of template, use <$text
text=<<myVariable>>/>
to see the result of you variables when used as attributes.
try instead
<$set name="myVariable"
filter="[field:title{$:/status/UserName}get[created]]">
<$button>Click<$action-sendmessage message="whatever" field=<<myVariable>>
/></$button></$set>
all the best
BJ
On Thursday, February 9, 2017 at 12:02:32 AM UTC+1, David Szego wrote:
>
> I seem to be asking the same question all the time! ;->
>
> Tiddler 1:
>
> \define myName() {{$:/status/UserName}}
> \define myCreated() <$view tiddler=$(myName)$ field="created" format=
> "text"/>
>
> MyName: <<myName>> (shows DavidSzego)
>
> MyCreated: <<myCreated>> (shows datestamp)
>
> Tiddler 2:
>
> List (should return back the Tiddler with my name):
>
> <$list filter="[field:created<myCreated>]">
> <<currentTiddler>>
> </$list>
>
> <$button>Click<$action-widget message="whatever" field=<<myCreated>>
> /></$button>
>
> When I call <<*myCreated>>* directly, I get the date stamp.
>
> When I call it from a macro *or* a widget, the best I can get is "*true*"!
>
> But more often, I get some kind of quoting error (changes depending on the
> single/double/none quotes I use in the "*<$view>*" widget above), where a
> button will generate something like
>
> *[Click />]*
>
> where *<$button...> *is including the closing* /> *from the
> *<$action-widget* ...
>
> Any hints on how to call these properly?
>
> Thanks! =-)
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywikidev/278b7ddf-a441-4f87-a101-9091a8abe4b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.