MojoPad

Database Views

Your pages already carry structure — tags, types, and your own typed properties (Status, Rating, Author, a due date…). A database view turns that structure into a live table you can filter, sort, and group — a spreadsheet whose rows are your pages. Build one once and it stays current: add a page that fits, change a property, and the view updates itself.

Make one

Run New Database View… from the command palette (⇧⌘P), or View ▸ Database Views… and choose + New. Give it a name and a table opens showing every page, with a few starter columns. From there you shape it with the toolbar across the top — every change saves as you go, and the view is yours to reopen any time from Database Views….

Shape it

  • Filter+ Filter, pick a column, a condition (is, contains, greater than, is empty…), and a value. Filters stack; each shows as a chip you can remove with its . “Books I’m still reading” is Type/tag is Book plus Status is Reading.
  • Sort — click any column header to sort by it; click again to reverse. (The Sort toolbar button does the same and shows the current order.)
  • Group — the Group button clusters rows under a heading for any column, each with a count: group your books by Status and see how many are Reading, Finished, To read.
  • Columns — the Columns button adds or removes columns. Choose from built-ins (Type, Tags, Created, Modified, word count, open/total tasks) or any of your properties.

Click any row to open that page. Close the view with — it’s saved, and reopening it shows the current state of your wiki, not a snapshot.

Computed columns — a formula of your own

In the Columns picker, choose ƒ New computed column… to add a column whose value is calculated from the others. Reference any column by its name in [brackets]:

  • daysBetween([Modified], today()) — how long since each page was touched.
  • [Rating] * 2 — arithmetic on a number property ( + − × ÷ all work).
  • if([Rating] > 4, 'great', 'fine') — conditions; also [Rating] > 4 ? 'great' : 'fine'.
  • if(empty([Rating]), 'unrated', concat([Rating], ' stars')) — handle blanks, build text.

The functions: today(), daysBetween(a, b), if(cond, a, b), round(x, digits), concat(…), contains(text, part), empty(x), and len(text). Formulas are checked as you create them — a typo is caught with a message, and a formula that references a column that doesn't exist shows a small #ref in just that cell, never breaking the row. Computed columns sort, group, and filter like any other (numbers as numbers), and they wear an ƒ in their header. A formula can't reference another formula, so they can never chase each other in circles.

Three ways to draw it: Table, Board, Gallery

The switcher in the toolbar redraws the same view three ways:

  • Table — the spreadsheet: sortable columns, group headers, everything above.
  • Board — lanes built from one of your select properties (pick which with the Lanes button). The board is for pages that move through stages, and dragging a card between lanes changes the property itself — the page is updated, everywhere. Think of it as the fastest way to re-file a handful of pages at once, not a place to arrange files:
    • A reading pipeline — books with a Status property: To read → Reading → Finished. Finishing a book becomes one drag.
    • A writing pipeline — essays and posts as pages: Idea → Drafting → Editing → Published.
    • Note maturity — the digital-garden pass: Fleeting → Developing → Evergreen. A weekly sweep of the first lane, promoting what grew.
    • A project backlog — features or chores as pages: Idea → Planned → Doing → Done.
    Cards without a value gather in a lane; drop a card there to clear the property. Double-click a lane's name to rename it — the select option is renamed and every page carrying that value follows, so nothing is orphaned.
  • Gallery — a wall of cards, one per page: the page's cover image when it has one, its icon and name, a slice of what's written on it, and its first few column values as small chips. Clicking a card opens it over the wall to read, exactly as in The Gallery. Grouping applies here too, so “my books, grouped by status” reads as shelves.

The layout is saved with the view — a board stays a board next time you open it.

Put a view inside a page

A view doesn’t have to live in its own window. Type / on any page and choose Database view — the view you pick lands in the page as a compact live table. It shows the first dozen rows (with an …and N more link when there are more), refreshes every time the page renders, and clicking its title opens the full view for filtering and shaping. On Markdown pages it round-trips as plain text — ![[view:Reading list]] — the same syntax page embeds use, so you can also just type it. A project page that opens with its own live task table, a reading page headed by your shelf: the page becomes a dashboard.

What the columns can show

Beyond your own properties, every view can show a page’s tags, its Page type (the coloured category from the type pill — drawn as its coloured chip, and the natural way to build “all my Books”), its storage type, when it was created or last modified, its word count, and its task counts (open and total, counted from the page’s checkboxes). Numeric columns — ratings, counts, dates — sort and compare as numbers, so greater than and less than filters do what you’d expect; pages missing a value sort to the end rather than pretending to be zero.