Automatically update note's properties

I want to update note properties when an event happens.

For example, I want to track how many times I’ve modified a note over the last year, month, or week (counted daily). So, I need to set and update ‘mcounter’ and ‘mdates’ properties each time I make a change.

How can I accomplish it in Obsidian?

I can write simple JS code. I don’t know how to access Obsidian data and execute the code when I would like it to run.

I tried Dataview, Templatr and QuickAdd plugins. They cover a lot of my use cases. But, unless I miss sth, they won’t work in the case specified above.

Thank you in advance for any help.

I’m also looking for a possible way to do this with the linter plugin.
There is a way to dynamically update properties of child notes with the frontmatter-generator plugin, as seen in this thread https://old.reddit.com/r/ObsidianMD/comments/1b9c2o1/how_to_make_notes_created_inside_another/

this can be done with a workaround: set up git and add to the note’s frontmatter the url of the note as it is in Github,
e.g. github.com/hanna/hannasvault/blob/12f71176e7f0e3138e483799e57d853e1bed8a4e/somenotename.md

if you install the surfing plugin you can access the file url within obsidian as well and see the history of the file

there is a learning curve with git of course but if the script is not going to be done by anyone, it will have done something good in the meantime – for example, you’ll learn how to sync your notes…

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