Can I define types and auto-create notes with those properties?

I an exploring making a formal ontology in an Obsidian vault.

I have to abide by some very strict rules to keep the conceptual organization clear.

Right now, I am requiring that a note corresponds to a “record”, like in a database, and a record should be an entity of some kind, like a specific instance of some class or type. So, you can have a note that is the representation of say, your teacher Ms. Robinson, but less so a note that is just you writing random thoughts on things.

A thing’s properties are given by the YAML frontmatter.

Like in SQL, RDF, and other relational data formats, an entity can have a data property or an object property. A data property is a literal value of one of a few established data types. In Obsidian, there are six types available: checkbox, date, date and time, number, list, and text.

An object property has another record as its value. In Obsidian, this can be achieved by linking to that record using the [[Wikilink]] syntax.

This means that you should choose your filenames carefully, as the become the canonical identifier for that resource / record.

I think it would be cool if I could set up the following.

Right now, I have a file called my email address. I have a text property called instance of with value [[email address]]. That file has property instance of type. That means that I have a type type, and email address is a specific type - so it is an instance of the type type.

In email address, I created a list property called has property. It includes the values [[domain (internet)]] and [[local part (email)]].

Ideally, Obsidan should understand that any note that is instance of email address should automatically have the property domain (internet) and local part (email). I can even make notes for those two entities, like domain (internet) instance of property, has range text, and so on.

I don’t know if you can run triggers that get run when you add a value to instance of automatically or something?

I think you can achieve this with Bases. There was a video that showed this process really well. Let me see if I can find it.

Here it is. Ignore the fact that it is about project management and just look at the way he builds it and uses Bases to create new notes with properties already filled in.

If not this, then you could always set up using regular Templates. Understand that a Template in Obsidian is not used to create a new note, but to add content to a note you have already created. You can use several templates to add content (body and properties) to one note.

1 Like