sending list to a custom field

5 views
Skip to first unread message

Dave Parker

unread,
Nov 22, 2009, 3:07:43 PM11/22/09
to TiddlyWiki
Hi,

Eric already helped me today with a related question here:
http://groups.google.com/group/tiddlywiki/browse_thread/thread/88628c439617c533

I've spent an hour searching for scripts I could use to send the list
generated in that script to a custom field, but am unsuccessful.
Here's what I've got so far:

[_(Left@)]Left ... [_(Right@)]Right ... [_(bilateral@)]bilateral

<script>
var out=[]; var fmt='%0';
for (var f in tiddler.fields)
if (tiddler.fields[f]=="true")
{
out.push(fmt.format([f]));
}
return out.join(', ');
store.setValue(tiddler.fields,"sendtext",(out.join(', ')));
</script>

it's that last line before the </script> that is my clumsy attempt at
getting the list generated by the line above it to go into a custom
field called "sendtext". I also tried putting "out.join(', ')" inside
{{ }}, but that didn't work either.

Any suggestions?

Tobias Beer

unread,
Nov 23, 2009, 11:35:31 AM11/23/09
to TiddlyWiki
Hi Dive,


store.setValue(tiddler,"sendtext",(out.join(', ')));

or

store.setValue(tiddler.title,"sendtext",(out.join(', ')));


You may want to have a look at some of the contents on http://tiddlywiki.org,
like:
http://tiddlywiki.org/wiki/Dev:Extended_Fields

Tobias.

Tobias Beer

unread,
Nov 23, 2009, 11:36:29 AM11/23/09
to TiddlyWiki
Well, I don't quite know how I got to put an i into your name... ;-)

Dave Parker

unread,
Nov 23, 2009, 1:42:16 PM11/23/09
to TiddlyWiki
Hi Tobias,

That did work. I spent a lot of time searching for the words "script"
and "field". No wonder I didn't find anything...(mental note:always
check tiddlywiki.org before posting)

Thanks very much.

Thanks also for your tbGTD, I use that as my main TW - its very nice!

Tobias Beer

unread,
Nov 23, 2009, 3:49:36 PM11/23/09
to TiddlyWiki
"Thanks also for your tbGTD, I use that as my main TW - its very
nice!"

You're welcome... without endulging in any sort of vainglory ...I like
it too ;-)

Tobias Beer

unread,
Nov 24, 2009, 10:09:20 AM11/24/09
to TiddlyWiki
Also, when searching for dev-related stuff on http://tiddlywiki.org
tick the 'dev' checkbox under advanced search! I do that everytime and
I wished it was activated by default.

Tobias.

FND

unread,
Nov 24, 2009, 10:14:35 AM11/24/09
to tiddl...@googlegroups.com
> when searching for dev-related stuff on http://tiddlywiki.org
> tick the 'dev' checkbox under advanced search! I do that everytime and
> I wished it was activated by default.

If you register an account, you can set the default namespaces to be
searched in your preferences.


-- F.
Reply all
Reply to author
Forward
0 new messages