Autiosave tiddler created with tm-new-tiddler

70 views
Skip to first unread message

MagoArcade

unread,
Jul 28, 2019, 5:42:21 PM7/28/19
to tiddl...@googlegroups.com
Hi. I want selected tiddlers created with $action-sendmessage/tm-new-tiddler to automatically save the new tiddler rather than open it to the user for editing. I tried a few permutations around the below - didn't work - I'm assuming this is because the $action-sendmessage/tm-sdave-tiddler is firing after the new tiddler have been focused + thus is waiting?

Existing code:

<$button>Create Item


<$wikify name="myfinal" text=<
<final>> >




<!-- ADD NEW TIDDLER -->
<$action-sendmessage
$message="tm-new-tiddler"
$param="_templateNode"
title=<
<myfinal>>
shorttext={{$:/_opTaskStore!!taskname}}
completiondate =  {{$:/_opTaskStore!!completiondate}}
/>


<$action-sendmessage $message="tm-save-tiddler" $param="<
<myfinal>>"/>


</$wikify>


</$button>

EDIT: Just to mention: I can't use the ActionCreateTiddlerWidget method due to some limitations in this method + what I'm trying to achieve. It has to be the method used in the code. 

any help appreciated!

Mat

unread,
Jul 28, 2019, 5:57:57 PM7/28/19
to TiddlyWiki

MagoArcade

unread,
Jul 28, 2019, 6:00:37 PM7/28/19
to TiddlyWiki
Thanks Mat, but I should have mentioned that it has to be the $action-sendmessage/tm-new-tiddler method (can't remember precisely why now, but this widget couldn't achieve everything I needed it to - thus having to use this method).

On Sunday, 28 July 2019 22:57:57 UTC+1, Mat wrote:
https://tiddlywiki.com/prerelease/#ActionCreateTiddlerWidget

<:-)

Mat

unread,
Jul 28, 2019, 7:57:32 PM7/28/19
to TiddlyWiki
I'm afraid I don't have any good answer then. If you don't get any good answer here, i.e if what you request is not possible, then l think you should post an issue on gh for this.

<:-)

Birthe C

unread,
Jul 28, 2019, 8:55:41 PM7/28/19
to TiddlyWiki

TonyM

unread,
Jul 29, 2019, 4:09:25 AM7/29/19
to TiddlyWiki
It is possible to get the same behavior from both new tiddler methods, a key difference in one is that is you need provide all field names and values when the other can use a template but can't do it silently.

Regards
Tony

MagoArcade

unread,
Jul 29, 2019, 4:55:02 PM7/29/19
to TiddlyWiki
Birthe nailed it - thanks fella. 

With this approach you can create a new tiddler and specify the fields without it opening in edit view all in one go:

<$action-setfield $tiddler="$:/_opEditNode"
title=<
<myfinal>>
shorttext={{$:/_opTaskStore!!taskname}}
description={{$:/_opNodeDetsEditText!!text}}
tags={{$:/_opTaskStore!!tags}}
nodetype= {{!!nodetype}}
tmap.id={{{ [[]make[%uuid%]] }}}
createdby={{!!createdby}}
managedby={{!!managedby}}
owner={{!!owner}}
assignedto={{!!assignedto}}
taskstatus={{!!taskstat}}
taskpercentage={{$:/_opTaskStore!!taskpercentage}}
color={{$:/_opTaskStore!!color}}
duedate =  {{$:/_opTaskStore!!duedate}}
stalldate =  {{$:/_opTaskStore!!stalldate}}

completiondate =  {{$:/_opTaskStore!!completiondate}}
/>
Reply all
Reply to author
Forward
0 new messages