Skip to content

Relation

A Relation property links an entry to entries in another collection. The link shows on both entries.

Example: in Tasks, “Project” is a Relation to Projects. The task “Buy the domain” has Project: Launch. The project “Launch” then shows Tasks: Buy the domain, Write the landing page.

One relation link shows on both entries: the task shows its project, and the project shows its tasks.TasksBuy the domainProject: LaunchProjectsLaunchTasks: Buy the domain, …one link in the database
One link, two sides. Edit either side and both change.

Rules

  • The link is one row in the database. Both entries show it, so the two sides never disagree.
  • The reverse side is on by default. You can hide it on one side. Example: Flour in Foods is used by a thousand meals, so you hide the “Meals” list on Flour.
  • One entry can link to several entries: a book can have two authors.
  • A Relation is not ownership. Deleting an author never deletes the book.
  • A Relation is not a Parent. For “this sits inside that”, use the Parent field and a Children property.

Settings

Setting What it does Example
Name The name on this side. Project
Linked collection Which collection it points to. Projects
Reverse side Show the link on the other entries too (on by default), and its name there. Tasks

A setting to allow only one linked entry is not decided yet.

How it shows

Place Shows
Card the linked titles as chips
List and table row the same; views filter by it (“Project is Launch”)
Entry page the chips, with the standard picker to add or remove links

In the folder

The link is a [[link]] in the frontmatter of both files. Link paths start inside Collections/.

Tasks/Buy the domain.md project: [[Projects/Launch]]
Projects/Launch.md tasks: [[Tasks/Buy the domain]], [[Tasks/Write the landing page]]

Edit either line, in the app, in a file or with kzx, and the app changes the one link and rewrites both files. If you hide the reverse side, that file leaves the list out too.

AI, formulas and sync

  • AI and coding agents follow links. kzx context returns an entry with its links in both directions in one call. The read-only database copy has a links view.
  • Formulas can read linked entries. The functions for this are not decided yet.
  • Sync merges links one by one: two devices that add different links offline keep both.