Data
A few lines of CSV in a document become a table you can sort, filter and edit, or cards, a board, a calendar, a chart or a form. Every change you make there is written back into the text, so the file stays the one true copy.
Make a table
#Add use data to the rules block, then write the records in a data block. The first line
names the columns:
~~~ selfscribe
use markdown
use data
~~~
```data books
title, author, year:number, read:toggle
The Hobbit, Tolkien, 1937, yes
Dune, Herbert, 1965, no
Middlemarch, Eliot, 1871, yes
```
| title | author | year | read |
|---|---|---|---|
| The Hobbit | Tolkien | 1937 | |
| Dune | Herbert | 1965 | |
| Middlemarch | Eliot | 1871 |
On the page, click a header to sort, Search to find, or a switch to change a value. Each
click edits the line it belongs to, as one step you can undo. Quote a cell that holds a comma:
"Porto, Portugal".
Say what a column holds
#After a colon, the first line says what each column holds. A value that does not fit is underlined, with the reason.
| Type | Example | Shows as |
| none | title | text |
number | hours:number | a number, right-aligned, with totals |
date | due:date | a date: 2026-10-01 |
toggle, bool | done:toggle | a switch, or yes and no |
rating | stars:rating, rating(10) | stars to click |
choice(…) | status:choice(…) | a menu, and the columns of a board |
suggest(…) | tag:suggest(…) | suggestions, any value allowed |
choice(from …) | client:choice(from clients.name) | a record of another table |
list, url | tags:list | several values, or a link |
A choice lists its values between bars: status:choice(todo|doing|done).
Show the records another way
#Write how a block shows after its name, or show it again anywhere with a view: line:
~~~ selfscribe
use markdown
use data
~~~
```data tasks as board by status
title, status:choice(todo|doing|done), owner, hours:number
Paint the hull, doing, Ada, 6
Order the sails, todo, Bo, 2
Fix the winch, done, Ada, 3
```
view: tasks as chart by owner sum hours
todo 1
Order the sails
- owner
- Bo
- hours
- 2
doing 1
Paint the hull
- owner
- Ada
- hours
- 6
done 1
Fix the winch
- owner
- Ada
- hours
- 3
Hours 11
as takes table, cards, board, list, calendar, gantt, chart, form, stats,
heat, map or flow. Then come the options:
| Option | What it does |
by status | The board's columns, the chart's bars, or the calendar's date. |
group owner | Groups the records, or gives a board a lane per owner. |
sort due desc | Sorts them. Without it, they keep the order of the text. |
filter not done and due < today+1w | Shows only the records that pass. |
columns title, due | Shows only these columns, in this order. |
sum hours | Adds a total. avg, min, max and count too. |
when due < today -> red | Colours the records that pass, in every view of them. |
plain | Draws the view with no bar of buttons, as part of the page. |
The view's own buttons do the same, and Save view writes them into its line. On a board, drag a card to another column, or press Alt+← and Alt+→.
A chart is bar unless you say hbar, line, area, pie or donut:
as chart line by due month sum amount. A date column groups by day, week, month,
quarter or year.
Work with dates
#A date cell holds a real date, but you can type a short form and the cell gets the date it stands for:
| Type | Gives |
today, tomorrow | that day |
2w, 10d, 3m, 1y | that long from today |
10wd | ten working days from today |
+2d, -1w | the cell's own date, moved |
fri, next mon | the next one to come |
Filters count from the reader's day the same way: filter due <= today+2w. Working days skip
weekends and the days of a table you name with set holidays NAME. set dates weekday shows
Tue 14 Jul 2026.
Work out a column
#End a column's name with = and a sum. It updates as you edit, and the records have no field
for it:
~~~ selfscribe
use markdown
use data
~~~
```data jobs
job, start:date, hours:number, rate:number, total = hours * rate, due = start + 10wd
Survey, 2026-09-11, 12, 80
Menu, 2026-09-14, 4, 60
```
| job | start | hours | rate | total | due |
|---|---|---|---|---|---|
| Survey | 12 | 80 | 960 | ||
| Menu | 4 | 60 | 240 |
- Numbers:
+ - * /and brackets, exactly:price * 1.2. - Dates:
start + 3w,start + 10wdin working days,due - startfor the days between. - Another table:
client.emailreads through achoice(from clients.name)column.sum(jobs.total)andcount(jobs)total the rows ofjobsthat point at this record. - Functions:
if(due < today; 'late'; 'on time'),round(price / 1.2; 2),min,max,abs,concat,joinanddays. Values are separated by;and text is in single quotes.
set currency £ shows money columns with the sign: £1,095.00.
Set rules for a column
#Write rules after a column's type. Each of these is one column of a header line, with commas between them:
task:text required unique
status:choice(todo|doing|done) default todo
qty:number min 1 max 100
code:text pattern AA-9999
finished:date when status = done then today
| Rule | What it does |
required, unique | A record needs a value here, and no two records share one. |
default VALUE | What a new record starts with. A date takes today or 2w. |
min, max | The least and the most. Add warn to mark a value outside instead of refusing it. |
pattern AA-9999 | The shape of the text: A a letter, 9 a digit, * any character. |
when TEST then VALUE | Sets the cell when a change makes the test true. else VALUE when it stops. |
readonly, hidden | Shown but not typed in, or left out of views. |
on status = won add tasks | Adds a record to tasks when the test becomes true. |
Tools › Tables… has Column rules for each table, as switches and fields. readonly
and editors ana, tom on a block's first line or a view's line say who changes the records.
A name is what each person typed in Settings › Editing › Your name.
Keep some of the records under a name
#A query is the records of another table that pass a test. Views of it edit the table:
```data late from jobs where due < today and not done as list
```
End it with per for totals as records, one per client:
data load from jobs per client sum hours. Add across quarter for a pivot, a grid of
totals. Add a query in Settings › Data writes the block.
Make a form
#A form shows a field per column. layout groups the fields: a comma starts a new line, |
puts fields side by side, and a word with a colon heads a group.
view: quotes as form layout Client: client | email, Terms: status | due, notes
help 'TEXT'andplaceholder 'TEXT'after a column's type add a line and a hint.as form stepsshows one group at a time, with Back and Next.as form sectionsfolds the groups.
vat:text if kind = firm requiredshows a field only when it applies.
To collect answers from other people, put the caret in a table and choose File › Collect answers…:
| Way | What it takes |
| Send a file | One .html form that works offline. Answers come back as a .csv. |
| While this computer is on | A link for people on your network, or anywhere through a Cloudflare tunnel. |
| Always on | A form on your own Cloudflare account. Answers wait there until the app takes them in. |
Each answer becomes a record of the table. Nothing passes through any server of Selfscribe.
Put a button in each row
#view: data/plants.csv as table button Watered runs watered
Each row ends with a Watered button. It runs actions/watered.self with that row's record,
and the action reads its cells by name: {name}, {room}. Automations
says how to write the action.
Keep the records in a file
#In a folder, a view can show a .csv, .tsv or .json file next to the document:
view: expenses.csv as table sum amount. Edits go back into the file. In the desktop app, a
SQLite database works the same way, and every change is written into the database:
view: shop.sqlite/clients.csv as board by status
Save dates as a calendar file, under More in a view's bar, makes an .ics file for
Google Calendar, Outlook or Apple Calendar.