Need a bit of help with a Templater template

I found this Templater template for meeting note creation which upon instantiation queries a folder for all files with a specific tag and presents the option to select. I want to use this to be able to associate meetings to projects. Where I need help is I want to use a property instead of a tag but I’m not really sure how to make that happen. The property I want to filter for is “type” with a value of “project”. Any help much appreciated. Here is the template:

tags: :computer:/:date:
created: <% tp.file.creation_date(“YYYY-MM-DD”) %>
modified: <% tp.file.last_modified_date(“YYYY-MM-DD”) %>
const days = [“today”, “yesterday”, “tomorrow”]
const dateValue = await tp.system.suggester(days, days, true)
const newDate = app.plugins.plugins[‘nldates-obsidian’].parseDate(dateValue).moment.format(“YYYY-MM-DD”);
const tag = “#:computer:/:dart:
const files =
.filter(file => file.path.match(“70 Work”))
.filter(file => {
const tags = tp.obsidian.getAllTags(app.metadataCache.getFileCache(file));
return tags.includes(tag);})
.sort((a, b) => a.basename.localeCompare(b.basename));
const project = (await tp.system.suggester((file) => file.basename, files)).basename;
const newPath = “70 Work/Meetings/” + newDate + " " + project;
await tp.file.move(newPath);

↑ [[<% project %>]]


  • <% tp.file.cursor(0) %>



Thank you once again!

Maybe this could help you a little ? :innocent:

Suggester for files that are in folder that also match frontmatter metadata

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