Grab project metadata when creating a meeting that is tied to that project

Things I have tried

I have looked for snippets and tutorials and tried about 15 different ones, but to no avail.

What I’m trying to do

I have a meeting template that I use for my 9-5 job’s projects. Each project has a name (e.g. RC PC4) and a tag to help me find tasks and content associated with that project (e.g. #wwsd-7012-rc-pc4).

I have managed to get the template working to where it looks in my projects folder and finds all files within it. That way, when I start a meeting, I use tp.system.suggester to provide a list of the projects.

What I would like to do now, is take that result, and find the project’s dashboard file, which has the project tag listed as metadata in frontmatter. So, for example, the project index’s frontmatter might look like:

---
creation_date: 2023-02-22 13:23
project_tag: #wwsd-7012-rc-pc4
---

If each project has its own subfolder under WWSD/Projects and then each project folder has a project dashboard/index that’s either called index.md, or <<project.title>>.md, where this frontmatter resides, then how can I use Templater to grab that project_tag from the project index’s frontmatter to include in the meeting notes’s frontmatter, for easy searching?

Also, I’m somewhat new to this. If there’s a better way to organize myself, I’m all ears

Here is my meeting template. Ideally, the pt variable would be filled automatically by using the project names suggested to me:

---
<%*
  const dv = this.app.plugins.plugins["dataview"].api;
  var d = await tp.system.prompt("When did the meeting take place", tp.date.now("YYYY-MM-DD"));
  let projects = dv.pages('"WWSD/Projects"').file.sort(n => n.name);
  let suggestions = projects.name;
  let values = projects.link;
  var pn = await tp.system.suggester(suggestions,suggestions);
  var pt = await tp.system.prompt("What is the project tag?", "wwsd-");
  var t = await tp.system.prompt("What is the topic for this meeting?");
  await tp.file.rename(d + ' ' + pn + ' ' + t + ' Meeting Notes') %>creation_date: <% tp.file.creation_date() %>
meeting_date: <%* tR += d ? d : 'blank' %>
project: <%* tR += pn ? pn : 'blank' %>
meeting_topic: <%* tR += t ? t : 'blank' %>
tags:
 - <%* tR += pt ? pt : 'blank' %>
participants:
 - 
---

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