Button in Daily template to Create a New Note and link (Using Templater/Button plugins)

Good Evening, I pretty much have this working but struggling to get a link to a new note back into my Daily.

What i want is that my Daily Template (which works fine) is to have a button on to create a specific task note in my Tasks folder (I will be using Tasks plugin for Simple 1 time Tasks but will use this note/tasks setup for more complex multitask/project situations and will prefill some fields Yaml /Inline to filter tasks)

So Button is defined in the Daily note as below and templator is set to run to Task templator for that folder. Trouble is Link is going into New Note rather than the Daily Note.

Not sure if this is possible or not ?? Totally new to Buttons, templator less so, but still class myself a newbie/amateur level (lol).

Thanks in advance for any advice

name New Tasks
type note(Tasks/New Note) template 
action Task

My Task template
<%*
let strtitle = await tp.system.prompt(“Task Line Summary:”)
let actualDate = await tp.date.now(‘YYYY-MM-DD’);
await tp.file.rename(actualdate+“-”+strtitle);
tR += “[” + “[” + strtitle + “]]”;
%>

What I’m trying to do

You could use an append template button that then calls tp.file.create_new() to create the new note.

‘’‘button
name …
type append template
action new task
‘’’

new task:

let strtitle = await tp.system.prompt(“Task Line Summary:”)
let actualDate = await tp.date.now(‘YYYY-MM-DD’);
tp.file.create_new(actualdate+“-”+strtitle)
tR+=  “[” + “[” + actual data + "-" + strtitle + “]]”;

Say you want a template in the newly created task note, create_new accepts a template argument that will be used on note creation.

If you don’t want the link directly below the button, use a line template

Thanks Shabegom for your time and reply, has given me the direction I needed :slight_smile:

I like the create_new approach with a template but ultimately for simplicity have opted for the line approach

Coolio. I think you can mark this as solved or something so people see there is an answer.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.