I have a Templatr template (below), which is for creating people I meet. It contains a front matter value of company. I’d like to use this front matter value to move the note to a subfolder with that front matter value.
I recon your issue is that templater is triggerred on creation of the file or when you ask it to create frontmatter at that time company is undefined hence not moving to the right folder,
A workaround is to have an template that only has templater commands in it and trigger it after you’ve filled in the front matter
I have a similar issue when I paste formated markdown from clipboard and wanted it it to pick up the title and move to a folder automatically however I think in that case there is a race condition and things happen to fast and are undefined when that part of the template triggers
const company = await tp.system.prompt("What company is this person a part of?");
await tp.file.move("/Extras/People/" + company + "/" + tp.file.title)
company: <%* tR += company; %>