Dynamic file and formula properties from Bases in YAML

Use case or problem

Bases introduced powerful formula properties and dynamic file properties like file.mtime and file.size.

Unfortunately, both can only be used and viewed within a base.

Proposed solution

Add support for the two new property types—file properties and formula properties—to frontmatter in-note.

For example, if we input the following values in note YAML:

---
reading_speed: 250
words: 1000
time to read: "words / reading_speed"
modified time: "file.mtime" 
file size: "file.size"
---

The output would be:

---
reading_speed: 250
words: 1000
time to read: "4" # Calculated dynamically based on values of above properties
modified time: "2025-08-01 03:32" # Updated dynamically
file.size: "1 KB" # Updated dynamically
---

A view to create or edit a formula property could be brought up when opening the context menu for the formula property type.

In particular, the dynamic modified time property would be amazing and is in high demand:

In my experience, the community plugin solutions that accomplish this are unreliable.

Current workaround (optional)

Related feature requests (optional)

11 Likes

This can’t be. Notion can never have an offline mode and Obsidian can never have a formula property. It’s just laws of physics. Jokes aside, I hope this is added. It’s overdue since Pythagoras was born.

The functionality they’ve added is respectable, but calling it “offline mode” is playing with users’ feelings. Still, both apps are moving toward their respective epiphanies. So, I digress!

Man, they really ought to add this feature. It is so within the app’s range, and will also be universally useful to practically everyone!

2 Likes

As a matter of example.

Imagine you have a base with games, and each game has Steam ID property. Instead of having to manually fill in other properties with this very Steam ID that would form links to for example launch the game, a simple formula could take that property and add it to the link, dynamically updating it.

Source: https://www.reddit.com/r/ObsidianMD/comments/1oxpk1j/are_there_other_useful_universal_link_for_apps/

The way I see this being implemented is with formulas being made in the settings, and either

  1. any note that has the property(s) the formula requires this formula will be shown in;
  2. or you have to specifically add the formula like you would with a property, and if not already present it would add the required properties.

To reuse @peeragetalkers example from their original post, you would define the following in settings:

time to read: "words / reading_speed"
modified time: "file.mtime"
file.size: "file.size"

Whenever a note has both the properties words and reading_speed, the formula time to read would be shown too (as described in option 1 above; syntax illustrative, using a predefined property that gets rendered in a different way):

---
reading_speed: 250
words: 1000
showformulas:
    - "time to read"
---

In the case for the formulas modified time and file size, you would have to manually add those formulas as if you would add a property (option 2 above), then it would add them to the showformulas list:

---
showformulas:
    - "modified time"
    - "file size"
---

The only problem with this approach would be the abstraction (if that is the correct word) from the formula name in the properties, and what the formula does. On the other hand, this ensures all notes with this formula shown are always gonna have the exact same formula, unlike if you were to write the formula as you would properties.

Whenever you are exporting a note with visible formulas, they would be “collapsed” to their outcome, even if exported to markdown files, to keep the data intact:

---
reading_speed: 250
words: 1000
time to read: 4
modified time: "2025-11-22 16:50"
file size: "2 KB"
---

I would assume any and all functions available to Bases formulas would be available here too, although html() could be a little hard to make work correctly (but would be really cool if it were to be implemented too).

Tell me what you think of this different approach, potential pros/cons you can think of?

Additional idea

It would be cool if note formulas had access to some more stuff, for example headers and their hierarchy for automatic table of contents at the top of the page.