Bases: Read from File Function

The feature would be adding a read a line from file like a table (or maybe tables themselves!) function for Obsidian Bases formulas. It would be paired with other functions like split() and replace() to parse it.

Example

AmmoTypes.md:

name: size, use

9mm: "small", "pistol"
7.62x51: "intermediate", "rifle"
12gauge: "intermediate", "shotgun"
point50bmg: "heavy", "machine gun"

Obsidian Base function (approximate)
read("AmmoTypes.md",file.caliber,"size")
This function would take the caliber property from the file and it would display the size according to the table.

So if file.caliber is “9mm” it would display “small”.

Current workaround (optional)

You can use an inline key-value table but it’s inconvenient and it’s hard to maintain it when adding new content.

Related feature requests (optional)

I think you need to rewrite this FR because it’s not clear what you are asking.

The title is also Bases: Read from File Function is also too generic.
What you seems to be asking is to externalize to a separate file a 1-to-1 map between one attribute value and other values.

1 Like