# Databases and Data Cards (Labs)

> See each card type as a database with Table, Gallery, Board and Calendar views, and keep data tables on cards.

Source: https://writermorph.com/help/databases/

Databases are a Labs feature: they stay off until you turn them on.

## Turn them on

![Settings › Labs: Databases and Live Pages stay off until you turn them on here.](https://writermorph.com/media/h-set-labs.webp)

Open **Settings › Labs** and turn on **Show card types as databases (Table · Gallery · Board · Calendar)**.

With the switch off, the **Database** button, **View › Database** and the Database Kit menu items are hidden. Your cards and their properties stay as they are.

## The idea

Every card type in a planner is a database. Its cards are the records and its properties are the fields. Nothing is copied: edit a record and you edit the card, on the canvas and everywhere else.

Each planner has its own databases. A new card type with no cards yet is listed too.

## Open the Database panel

![The Database panel: characters as records, their properties as columns.](https://writermorph.com/media/h-db-table.webp)

Click the **Database** button in the planner toolbar, or choose **View › Database**. The panel docks, floats and remembers its size like the other panels.

The menu at the top left of the panel:

- picks the database: each card type, with its number of cards,
- makes a **New Database…**, which is a new card type,
- lists your **Data Cards** and makes a **New Data Card**.

**New** adds a record, which is a new card of that type. Double-click a record to open it in the card editor. Right-click it for **Open**, **Show on Canvas** and **Delete**; a deleted card goes to the planner's Trash.

## The four views

![Gallery view, with a cover picture on each record.](https://writermorph.com/media/h-db-gallery.webp)

![Board view: records grouped by a select field.](https://writermorph.com/media/h-db-board.webp)

Click **+** next to the views to add a **Table**, **Gallery**, **Board** or **Calendar** view. Right-click a view to **Rename…** or **Delete View**.

| View | What it shows |
|---|---|
| **Table** | One row per card. Edit cells in place, click a column header to sort, drag a column's edge to resize it, and drag a header onto another to move it. |
| **Gallery** | The cards as tiles. **Cover** picks the card's own picture or an Image field; **Size** makes the tiles larger or smaller. |
| **Board** | Columns from a select field chosen under **Group by**, such as Status. Drag a card to another column to change the value. |
| **Calendar** | Cards on a date field chosen under **Date**, by **Month** or **Week**. Drag a card to another day. Cards with no date are listed apart. |

Each change to a record, such as an edited cell or a card dragged to another column or day, is one step you can undo with ⌘Z.

## Search, sort and filter

- **Search** narrows the records as you type.
- **Sort** orders them by a field. Choose the same field again to reverse the order, or **Clear Sort**.
- **Filter** shows only the records that match. A filter is a field, a test and a value. The tests include is, is not, contains, does not contain, greater or less than, is before, is after, is empty, is not empty, is checked and is not checked.
- **Fields** shows or hides columns.

Each view keeps its own sort, filter and fields.

## Fields

Every database has **Title**, **Summary**, **Status**, **Tags**, **Last edited** and **Words**, plus task and story fields where they apply. Add your own with **Fields › New Field…**:

| Type | Good for |
|---|---|
| **Text**, **Long text** | Names, notes, descriptions |
| **Number** | Ages, prices, page counts |
| **Date**, **Date & time** | Deadlines, story dates, events |
| **Checkbox** | Done or not done |
| **Select**, **Multi-select** | One or several choices from a list |
| **URL**, **Email** | Web addresses and email addresses you can open |
| **Image**, **Files** | Pictures and files from the card's attachments |
| **Relation** | A link to records in another database |
| **Formula**, **Rollup**, **Lookup** | Values WriterMorph works out for you |

A field's name belongs to one type: you can't add a field with the name of an existing field of another type.

### Relation

A Relation field links records to records of another database in the same planner. The other database shows the link back as a column of its own. For example, make a Factions database, give your characters a **Faction** relation to it, and each faction lists its members.

### Formula, Rollup and Lookup

Calculated values are worked out each time they are shown, never typed by hand. You can sort and filter by them. To change or delete one, right-click its column header.

**Formula** refers to other fields by name in braces, such as `{Words}`. You can use `+ - * /`, comparisons, `and`, `or`, `not`, and functions such as `if`, `round`, `min`, `max`, `sum`, `concat`, `contains`, `length`, `today` and `days`. Type `{` and WriterMorph suggests field names. Some examples:

- Estimated pages at 250 words a page: `round({Words} / 250, 1)`
- A label from a number: `if({Words} >= 1000, "long", "short")`
- Days left until a due date: `days(today(), {Due})`

A formula with a typing mistake, an unknown field or a loop is refused when you save it. A problem in one record shows as #ERROR in that cell.

**Rollup** follows a Relation and combines a field of the linked records: Count, Count values, Sum, Average, Min, Max, Percent checked, Earliest date or Latest date.

**Lookup** follows a Relation and shows a field of the linked records, or one cell of a linked data card's table.

## Data cards

Some data doesn't need its own cards: a character's inventory, the sources for one chapter, a budget. A **data card** holds properties and tables instead of text.

Make one with **New card ▾ › Special › Data Card** in the planner toolbar, or **Data Cards › New Data Card** in the Database panel's menu. **Special › Properties Card** makes the same kind of card for properties only; you can add a table to it later.

A data card can hold several tables:

- **New Table** makes a table of your own. Add columns with **Column** and rows with **New Row**, then type in the cells. Columns can be Text, Number, Date, Checkbox, Select, Multi-select, Long text, URL, Email, Image, Files or Relation. Image and Files cells use the card's attachments: pick one, or add it with **Add Image…** or **Add Files…**.
- **Link a Database** shows the cards of one of your databases inside the data card, as a Table, Gallery, Board or Calendar view. A linked table has no columns of its own; its columns are that database's fields.

Right-click a table's tab to **Rename…**, **Convert to Database…** or **Delete Table**. **Convert to Database…** turns each row into a card of a new database, up to 1,000 rows at a time, and the table then shows that database.

While you work in a table, ⌘Z undoes table changes. Tables are saved with the project, next to the planner, and go with the card when you duplicate, copy or paste it.

## Live Pages and AI apps

- A [Live Page](https://writermorph.com/help/live-pages/) can query your databases and read data tables. After you allow it to change cards, it can also add records and change data tables.
- With [AI Connections](https://writermorph.com/help/ai-connections/) on, Claude Code or Codex can read your databases and data tables. With **Allow changes** on, it can also create databases, fill in their fields and write data tables.

## Share a database setup

**File › Export › Database Kit (.wmkit)…** saves the planner's card types, fields, views and calculated fields, and the project's Live Pages, without any of your cards. **File › Import › Database Kit (.wmkit)…** adds them to the planner that is open.

## From Notion and Obsidian

A Notion export imports as a new project with its databases. Obsidian notes keep their database through a `collection:` line. See [Importing Your Work](https://writermorph.com/help/importing/).

## On more than one Mac

If you open the same project on more than one Mac, keep WriterMorph up to date on all of them. An out-of-date copy of the app shows a data card as an ordinary card, without its tables.
