Why not a write formula?
A formula that appended a row every time the sheet calculated would loop, duplicate, and hide side effects. Metagrid keeps one rule: formulas read. Writing is a click (or Space) on a button cell.
The button still uses the formula language: Source is evaluated the same way as =New order. Dest is a stored location — not a FILTER result.
Insert a button
- Select a data cell → Insert ▸ Button (keytip B).
- Action: Push data.
- Source — path to the form, table, or value. Blank = this dictionary (the form that contains the button) or this table row.
- Dest — stored table to append to, or a cell to overwrite. Same paths as formulas:
Orders,.Orders(up one, then Orders),#log. - Optional: Clear source after — empties the form (or that row) after a successful write. Won’t clear a whole table you copied from a formula.
Click the button or press Space. Undo works.
What dest does
| Dest | On click |
|---|---|
| Stored table | Append records. Field names on the source match dest fields. New names become fields. Calculated dest columns are skipped (the formula still fills them). |
| Numbered list | Append items. |
| Dictionary | Write matching field names (merge). |
One table record (Orders.1) | Patch that record’s fields. |
| A cell | Overwrite with the snapshot (a scalar, or a nested dictionary if the source is a form). |
A formula cell or FILTER result | Refused. Dest must be stored. |
Example — form → table
Workbook (dictionary) ├── Orders table Region · Item · Units · Price · Revenue (=Units.*Price.) ├── Form dictionary Region · Item · Units · Price └── Add button source Form → dest Orders (clear after)
Fill Form, click Add order. A record lands on Orders; Revenue calculates; the form clears. The sample workbook includes this.
If the button lives inside Form, leave Source blank and set Dest to .Orders (one parent climb, then Orders).
Other button actions
Refresh query (selection) · Refresh all queries · Open URL · Send email (export draft) · Recalculate. These do not write sheet data.
Agent API
Scripts already push with op: insert / set / update on the Agent API. Buttons are the same idea for a person clicking in the sheet.