Automatically updating note properties

I’m somewhat new to Obsidian. Actually, I’ve used it for months, but haven’t really taken full advantage of all its features, not to mention the wide range of community plugins.

I’ve used Templater to set up a template that gives the date the note was created as a property (created). And I want to do the same for date modified (modified). However, while created should remain constant, modified will obviously need to be updated whenever the note is updated. Is there a way to neatly automate this?

Thinking about the bigger picture, should I even be seeking to automate this? I can imagine there are circumstances where that actually wouldn’t be desirable. Maybe I should stick to a manually updated modified property, which is only updated when significant changes have occurred?

If I do that though, maybe I should be more careful with naming, as I’ve always taken modified to be quite literally the last time a change occurred in a file. If I’m manually updating it and only changing the date for the property when significant changes have been made, then that meaning is no longer applicable. It is more like last_major_revision (or is there a better name for it?)

Apologies for the rambling; these are just my thoughts at the moment. Happy to hear yours.

Really depends on your needs/wishes IMHO :blush: .

There are plugins which can keep a modified key in sync (Linter provide a (semi-)automatic way to do so, Update frontmatter modified date and alike :innocent: )

Now, if you want a list of “last_major_revisions” in stored in your Properties, this can be achieved with Templater too using an adapted version of Zachatoo’s snippet Update Frontmatter, you could run when you want to … or just add a value to the list manually, when you’d think it could be appropriate to do so…

Now, the question is, would “last_major_revisions” key be really useful ? :thinking:
I mean, if you refactor your notes often, then maybe yes … for some of them, potentially :blush:. But all and all the time … ?


Thank-you for these suggestions. The Update front matter modified date plugin looks like it might do the trick! I’ll give that a try later.

I am wondering, in a bigger picture, how this sort of metadata should be handled though. Including it in YAML front matter seems fine, but I am wary of plugins that do edits to individual notes automatically. (Ironic, I know, given that that’s exactly what I am requesting here.)

It seems like keeping track of “event” metadata (date created, modified, etc.) would be nice to have built directly into Obsidian (whether as an option for an individual note or within a separate note that aggregates that information and updates it ongoingly), given that file system metadata can’t always be relied upon, particularly when files are transferred across systems.

Just an update on this. I’ve found that the Update frontmatter modified date plugin does the job. The only issue is that because it doesn’t update instantaneously, at a certain level of granularity (i.e., seconds) the lag in updating the YAML property makes it to hard to tell what it’s doing. Although, arguably, it probably isn’t even necessary to have it display modified date/time at that level of detail (YYYY-MM-DDTHH:mm:ss) anyway—at least not in most circumstances.

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