[tw5] Problems getting $action-createtiddler to populate variable via SaveTitle

2019-07-21 Thread Watt
Hi MagoArcade

Here's one attempt. It looks like there's a bit of duplication but maybe that's 
how you need it. Other forum users will almost certainly have better solutions 
but this might work for you.

!Add Task
--
Task Name: <$edit-text tiddler="NewTask" field=NewTask tag="input" default="New 
Task" class='tc-edit-texteditor' placeholder='New Task'/>


Brief Description: <$edit-text tiddler="NewTask" field="BriefDesc" tag="input" 
default="no-one" class='tc-edit-texteditor' placeholder=''/>


Asigned to: <$edit-text tiddler="NewTask" field="AssignedTo" tag="input" 
default="no-one" class='tc-edit-texteditor' placeholder='no-one'/>


<$button>New Task


<$action-setfield $tiddler='_templateTask' $field='NewTask' 
$value={{NewTask!!NewTask}}/>

<$action-setfield $tiddler='_templateTask' $field='caption' 
$value={{NewTask!!NewTask}}/>


<$action-setfield $tiddler='_templateTask' $field='BriefDesc' 
$value={{NewTask!!BriefDesc}}/>

<$action-setfield $tiddler='_templateTask' $field='tmap.id' $value={{{ 
[[]make[%uuid%]] }}} />

<$action-setfield $tiddler='_templateTask' $field='AssignedTo' 
$value={{NewTask!!AssignedTo}} /> 



<$action-createtiddler $basetitle={{_templateTask!!NewTask}} 
$savetitle=tasksavetitle BriefDesc={{_templateTask!!BriefDesc}} 
AssignedTo={{_templateTask!!AssignedTo}} caption={{_templateTask!!caption}} 
tmap.id={{_templateTask!!tmap.id}}  />

<$action-setfield $tiddler=NewTask NewTask=''/>
<$action-setfield $tiddler=NewTask caption=''/>
<$action-setfield $tiddler=NewTask AssignedTo=''/>
<$action-setfield $tiddler=NewTask BriefDesc=''/>
<$action-setfield $tiddler=_templateTask NewTask=''/>
<$action-setfield $tiddler=_templateTask AssignedTo=''/>
<$action-setfield $tiddler=_templateTask BriefDesc=''/>
<$action-setfield $tiddler=_templateTask caption=''/>
<$action-setfield $tiddler=_templateTask tmap.id=''/> 

<$action-navigate $to={{tasksavetitle}}/>



-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c650ba3b-81b7-4d3e-9f9b-f8a0e4988dd3%40googlegroups.com.


[tw5] Problems getting $action-createtiddler to populate variable via SaveTitle

2019-07-21 Thread MagoArcade
Hi all - I can't figure out how to save the final name used by 
$action-createtiddler into a variable in the originating tiddler. 
Basically, I want to enter all of the data used in a template tiddler's 
field and then click a button and a new tiddler is created with the 
relevant fields populated with the text boxes for the originating tiddler. 

The code below:

!Add Task
--
Task Name: <$edit-text tiddler="NewTask" tag="input" default="New Task" 
class='tc-edit-texteditor' placeholder='New Task'/>


Brief Description: <$edit-text tiddler="BriefDesc" tag="input" default=
"no-one" class='tc-edit-texteditor' placeholder=''/>


Asigned to: <$edit-text tiddler="AssignedTo" tag="input" default="no-one" 
class='tc-edit-texteditor' placeholder='no-one'/>


<$button>New Task


<$action-createtiddler $basetitle='{{NewTask}}' $savetitle=tasksavetitle/>


<$action-navigate $to={{!!tasksavetitle}}/>


<$action-setfield $tiddler='_templateTask' $field='title' $value={{NewTask
}}/>


<$action-setfield $tiddler='_templateTask' $field='caption' $value={{
BriefDesc}}/>


<$action-setfield $tiddler='_templateTask' $field='tmap.id' $value={{{ [[]
make[%uuid%]] }}} />


<$action-setfield $tiddler='_templateTask' $field='assignedto' $value={{
AssignedTo}} /> 


<$action-deletefield $tiddler=NewTask text/>
<$action-deletefield $tiddler=AssignedTo text/>
<$action-deletefield $tiddler=BriefDesc text/>



The problem bit is this:

<$action-createtiddler $basetitle='{{NewTask}}' $savetitle=tasksavetitle/>


<$action-navigate $to={{!!tasksavetitle}}/>


The official info here 
suggests the 
final title used can be saved into a field or an index. So I created a 
field in my originating tiddler (i.e. the one this code is in) called 
"tasksavetitle". However, it doesn't appear to be populating. 

I basically just need a variable to pass to $action-navigate. As ever the 
tw wiki is a bit ambiguous/short on details.

Can anyone help?

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b5b3e0f0-2595-4098-8cd1-94f290b855d3%40googlegroups.com.