Automatically tagging from a field in another tiddler

5 views
Skip to first unread message

Linck Atlanta, Ga

unread,
Jan 5, 2010, 11:10:51 PM1/5/10
to TiddlyWiki
I have had success with:
<<newSavedTiddler label:'New Tiddler with a template'
text:{{'<<formTiddler [[NewTiddlerTemplate]]>'+'>'}}
tag:{{'y'}}>>

But I would like to replace 'y' with a syntax which would make it a
field that I would have defined in another tiddler.

I tried this...

<<newSavedTiddler label:'New Tiddler with a template'
text:{{'<<formTiddler [[NewTiddlerTemplate]]>'+'>'}}
tag:{{'<<forEachTiddler where 'tiddler.tags.contains("X")'
write 'tiddler.data("field")'>>'}}>>

But TW does not like it at all.

I appreciate any help.

Linck Atlanta, Ga

unread,
Jan 5, 2010, 11:23:21 PM1/5/10
to TiddlyWiki
By the way. There is only on tiddler that I would like to reference.
So, if there was a way to just reference a field@tiddler that would
work too.

cmari

unread,
Jan 5, 2010, 11:26:38 PM1/5/10
to TiddlyWiki
You could try:
tag:{{store.getValue("myTiddler", "myField")}}
cmari

Linck Atlanta, Ga

unread,
Jan 5, 2010, 11:37:49 PM1/5/10
to TiddlyWiki
Great Idea.. and thanks... but no go. Any other thoughts? I
appreciate you giving it a shot.

cmari

unread,
Jan 6, 2010, 8:12:42 AM1/6/10
to TiddlyWiki
Hmm, it worked for me in an empty TW file with only
NewSavedTiddlerPlugin installed, so maybe there's something about your
specific case. Are you really using a "custom field" or are you you
talking about a "form field"? Does your custom field value contain
spaces? Can you show the exact macro you tried?
cmari

Linck Schlich

unread,
Jan 6, 2010, 3:47:34 PM1/6/10
to tiddl...@googlegroups.com
OK,

my tiddler "Test Tiddler" has a field defined thusly; 

<data>{"testfield":"000"}</data>

And my new macro is:

<<newSavedTiddler label:'NEW ISSUE' 
         text:{{'<<formTiddler [[NewIssueTemplate]]>'+'>'}} 
         tag:{{store.getValue("Test Tiddler", "testfield")}}>> 

And... when I create a new tiddler by clicking on the button this macro creates, I get my new saved tiddler, but with no tag.  I was worried that it might be the space in Test and Tiddler, so i tried to change it (both in the macro and in the name of the tiddler) to TestTiddler... to no avail.  Thank you again for your aid.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To post to this group, send email to tiddl...@googlegroups.com.
To unsubscribe from this group, send email to tiddlywiki+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.




cmari

unread,
Jan 6, 2010, 4:45:39 PM1/6/10
to TiddlyWiki
Ok, sorry, I was led astray by your mention of field@tiddler, which
would be for a custom field.
For a form field, try
tag:{{DataTiddler.getData("Test Tiddler", "testfield", "")}}>>
cmari


On Jan 6, 2:47 pm, Linck Schlich <lschl...@gmail.com> wrote:
> OK,
>
> my tiddler "Test Tiddler" has a field defined thusly;
>
> <data>{"testfield":"000"}</data>
>
> And my new macro is:
>
> <<newSavedTiddler label:'NEW ISSUE'
>          text:{{'<<formTiddler [[NewIssueTemplate]]>'+'>'}}
>          tag:{{store.getValue("Test Tiddler", "testfield")}}>>
>
> And... when I create a new tiddler by clicking on the button this macro
> creates, I get my new saved tiddler, but with no tag.  I was worried that it
> might be the space in Test and Tiddler, so i tried to change it (both in the
> macro and in the name of the tiddler) to TestTiddler... to no avail.  Thank
> you again for your aid.
>

> > tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsu...@googlegroups.com>

Linck Atlanta, Ga

unread,
Jan 6, 2010, 5:12:02 PM1/6/10
to TiddlyWiki
It worked!!! Thanks! I am about a month in right now. Learning the
syntax is the biggest learning curve. I really appreciate your time.

> > > tiddlywiki+...@googlegroups.com<tiddlywiki%2Bunsubscribe@googlegrou ps.com>

Reply all
Reply to author
Forward
0 new messages