Getting Form data and Checkbox to play together

10 views
Skip to first unread message

paul....@gmail.com

unread,
Jun 29, 2009, 6:23:42 PM6/29/09
to TiddlyWiki, tru...@qwest.net
I've a series of tiddlers identied with a tag as an ActionItem. Each
of those tiddlers are built UdoBorkowski's FormTiddlerMacro. I want
to print out a list of all of the tiddlers that are not marked as
complete (using Eric Shulman's CheckboxPlugin) and extract the data
field containing the tiddler.data("aiTitle"). So it would look
something like:

[ ] AI001 Fix the Bathroom
[ ] AI004 Plan vacation

I've two code sippets, that both do 1/2 of the job. The first I can't
figure out how to add a checkbox. The second has the checkbox but I
can't extract the aiTitle information.

___snippet_1___

<<forEachTiddler
where
'tiddler.tags.contains("ActionItem") && ! tiddler.tags.contains
("Completed")'
sortBy
'tiddler.title'
script
'function writeActionItems(tiddler, index) {var result =""; if (index
==0)
{
result +="|!Number|!Description|\n";}
result +="|"+tiddler.title+"|"+"[["+tiddler.data("aiTitle")
+"|"+tiddler.title+"]]"+"|"+"\n"
; return result;
}'
write
'writeActionItems(tiddler,index)'>>

___snippet_2___
<<forEachTiddler
where
'tiddler.tags.contains("ActionItem") && ! tiddler.tags.contains
("Completed")'
sortBy
'tiddler.title'
write
"'[X('+tiddler.title+':Completed)] [['+tiddler.title
+'|'+tiddler.title+']]\n'">>
Message has been deleted

paul....@gmail.com

unread,
Jul 1, 2009, 9:38:23 PM7/1/09
to TiddlyWiki
OK, if no one understands my question, can you give me clues to what I
need to tell you so everyone understands my problem. Or if the
problem is clear, perhaps a checkbox 101 explanation would help me.

Alex Hough

unread,
Jul 2, 2009, 2:28:41 AM7/2/09
to Tiddl...@googlegroups.com
>I've a series of tiddlers identied with a tag as an ActionItem. Each of those tiddlers are built UdoBorkowski's FormTiddlerMacro

You could use an 'ActionItem' checkbox to your FormTemplate, then use
that instead of tags to do your fET search?

Alex


2009/7/2 paul....@gmail.com <paul....@gmail.com>:
>
> OK, if no one understands my question, can you give me clues to what I
> need to tell you so everyone understands my problem.  Or if the
> problem is clear, perhaps a checkbox 101 explanation would help me.
> >
>



--
http://www.multiurl.com/g/64

paul....@gmail.com

unread,
Jul 2, 2009, 11:20:28 PM7/2/09
to TiddlyWiki


On Jul 1, 11:28 pm, Alex Hough <r.a.ho...@googlemail.com> wrote:
> >I've a series of tiddlers identied with a tag as an ActionItem.  Each of those tiddlers are built UdoBorkowski's FormTiddlerMacro
>
> You could use an 'ActionItem' checkbox to your FormTemplate, then use
> that instead of tags to do your fET search?
>
> Alex
>
I'll play with that idea. But what is so slick about the checkbox
macro in the second snippet is that it is a system macro and when you
click on the box it changes the tag on the tiddler. I wish I
understood better how the write function worked so I could pass what
checkbox expects.

cmari

unread,
Jul 3, 2009, 7:10:58 AM7/3/09
to TiddlyWiki
One way to combine your snippets would be:

<<forEachTiddler
where
'tiddler.tags.contains("ActionItem") && ! tiddler.tags.contains
("Completed")'
sortBy
'tiddler.title'
script
'function writeActionItems(tiddler, index) {var result =""; if (index
==0)
{
result +="|!Completed?|!Number|!Description|\n";}
result +="|[X("+tiddler.title+":Completed)]|"+tiddler.data
("aiTitle")+"|[["+tiddler.title+"]]|\n";
return result;
}'
write
'writeActionItems(tiddler,index)'>>

cmari

Paul Truzzi

unread,
Jul 4, 2009, 12:11:21 AM7/4/09
to Tiddl...@googlegroups.com
That worked, now all I have to do is figure out what I was doing wrong.
Reply all
Reply to author
Forward
0 new messages