mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
520 stars 27 forks source link

Feature request: Allow fileClass default values for fields #572

Open matthewturk opened 7 months ago

matthewturk commented 7 months ago

I'd like to be able to set up a fileClass, either via a query or explicitly, and have it specify default values for specific fields. My use case is that I'm building a plugin that presents a "sidecar" panel, and I'd like to associate specific fileClasses with specific sidecar panels.

It would be really helpful if I could specify default field values and then retrieve those via getValuesForIndexedPath so that they could be overridden in specific files but have a default set based on the fileClass.

For instance, if I defined a fileClass via a query dv.pages("#example") and the base fileClass has the field sidecar-panel with a default value, I'd like to be able to access that even if I don't override it or specify it in the file.

If this is out of scope, that's of course fine and I can find another way to implement this -- but I so heavily use fileClasses already that this makes the most sense. And if you'd like me to try to implement it, I can give that a go too. Thank you!

mdelobelle commented 7 months ago

good idea. I will consider that for a future version

egutierrez-ar commented 7 months ago

I would also find this useful

My usecase is to make sure that certain fileClass always has a #tag associated to the fileClass as opposed to manually having to set it.

jfkidd83 commented 6 months ago

I would also find this useful. I am using a "tasks" fileClass, and have learned that I can't edit properties in a table unless the property's already been set. Example - for the "tasks" fileClass, I'd like to set a default status of "to do", so that I can click it to "in progress" from within my tasks table.

I'd also like to be able to set a default tag value per file-class, so that I can use Auto Note Mover to automatically file notes of a specific class in specific folders.