-
-
Save dannberg/2fc4d0b8a3e88cc24598473f4eb626ed to your computer and use it in GitHub Desktop.
| --- | |
| company: | |
| location: | |
| title: | |
| email: | |
| website: | |
| aliases: | |
| --- | |
| tags:: [[👥 People MOC]] | |
| # [[<% tp.file.title %>]] | |
| <% await tp.file.move("/Extras/People/" + tp.file.title) %> | |
| ## Notes | |
| - | |
| ## Meetings | |
| ```dataview | |
| TABLE file.cday as Created, summary AS "Summary" | |
| FROM "Timestamps/Meetings" where contains(file.outlinks, [[]]) | |
| SORT file.cday DESC | |
| ``` |
Hey @dannberg I wanted to build upon this template with slightly different use case. So what I want to do is as follows
- Create note from template and provide the person's name as title.
- Then I want to move the note to my People Notes folder by appending the current date to the existing file title.
- Then refer to the name portion of the file title in different sections of the template
# [[<% tp.file.title %>]]
<% await tp.file.move("/People Notes/" + tp.file.title + "--" + tp.date.now()) %>
## Discussed Items:
- <% tp.file.cursor() %>
## Action Items
- ### For me
-
- ## For [[<% tp.file.title.split("--")[0] %>]]
- <>
However this does not seem to work because the file move operation happens immediately when I create the note and entering the title removes the data from it and even if I don't remove the date, the tp.file.title does not give the title with date. I know this might not be trivial but is there a way to achieve this ? I am pretty new to Obsidian so maybe I am missing something very obvious here.
@dannberg Upgrade on the meetings dataview:
Now you have to put the file link manually, like so:
TABLE file.cday as Created, summary AS "Summary"
FROM "Timestamps/Meetings"
WHERE contains(file.outlinks, [[My file name]])
SORT file.cday DESC
You can use this.file.link, which makes the whole process automatic.
TABLE file.cday as Created, summary AS "Summary"
FROM "Timestamps/Meetings"
WHERE contains(file.outlinks, this.file.link)
SORT file.cday DESC
Intersting, in my vault, this table works without putting My file name in there (just the blank [[]]. But explicitly saying this.file.link is definitely better practice.
Ah, that solved the issue: I didn't have the "Trigger Templator on new file creation" option toggled on. Instead, I had put in the template in the Startup Template field, which was causing the move issue at startup of Obsidian. Should have followed the instructions! =) Thanks, @dannberg