I realized there was another way to do this that you might find easier. You could use the QuickAdd plugin by Christian B.B. Housmann. This avoids writing javascript which the above solution required. So, if that’s the issue, here’s an alternative.
You would create a macro (one macro to rule them all). Inside the macro you use a template command for each file you want to create. The macro looks something like:
Then each of the template commands looks roughly the same. Here’s the one for the Master project file:
and the associated template
Here’s the one for a project document Note
and the associaged template
The third step in the macro is extremely similar.
Note the “{{VALUE:Project Name}}” variable is used throught. I used this same variable in all of the templates and template commands so that QuickAdd would only ask for it once.
One thing to note is that Quickadd has a bug that when you add new template commands or Macros, they don’t get registered properly. The way around this is to stop and restart obsidian.
If this seems confusing, I’d look at several of the QuickAdd youtube videos (I recommend Nicole van der hoeven, Danny Hatcher or QuickAdd’s author Christian B.B.Housmann) for how to use QuickAdd
Just another possibility