Current file name for use in related database #524
CarolusIII
started this conversation in
Ideas
Replies: 1 comment
-
Many similar problems could maybe be solved if one could capture YAML field from a parent note values to a QuickAdd variable and then use that variable in subsequent Macro steps. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
QuickAdd is a great plug-in that has made my day on many occasions, but there is one single option that I am missing and it could open a world of new applications if it were available.
I have seen a similar request somewhere, so I would like to strongly support that request.
It is about a function {{filenamecurrent}}.
There is the function {{linkcurrent}} but this creates the name of the previous note in double brackets.
But imagine a database of Persons where the database fields are in the frontmatter YAML.
Now one of these fields would be "company:".
If then from the database of companies I open the note of COMPANYXYZ, it would be nice if I could add a new employee with a button on the COMPANYXYZ note.
Fortunately, the company note has the same name as the company name, so if I had this function {{filenamecurrent}} I could create a new note and in the frontmatter field "company" I could simply put the result of {{filenamecurrent}} and the new employee note is related to COMPANYXYZ.
I can then easily create dataview tables of all employees of COMPANYXYZ by using query: WHERE (company, "COMPANYXYZ")
The function {{linkcurrent}} would generate the company name in brackets and my Query would not find it.
I tried using string expressions to get rid of the brackets, but I could not find a solution there.
It could work the other way around, as linkcurrent = [[{{filenamecurrent}}]].
#47
Beta Was this translation helpful? Give feedback.
All reactions