Boolean
- Version
- 4.0 preview
- Updated
Yes/no, stored as text.
Storage kind: column · Column: varchar(1) — '0' or '1'
Use it for any genuine two-state flag. If the field is the record's publish state, use
published instead — it is this type plus the list toggle. If a third state is
meaningful ("not decided yet"), a boolean is the wrong shape: use a dropdown with
three explicit choices rather than a nullable boolean, because "NULL means unknown" is a convention
every reader has to be told about.
Settings
| Setting | Meaning |
|---|---|
default | 0 or 1. Give every boolean one |
The list gets a yes/no filter automatically when addDropdownFilter is set, and cells render as the
translated CBYES / CBNO rather than as 1 / 0.
Always declare a default
Two booleans shipped without one, and that is exactly how they ended up as nullable columns holding
neither '0' nor '1' — a third state for a two-state field, which every reader then has to guess
about. The default becomes the column default in generated DDL, so declaring it fixes both the form
and the schema.
A boolean should be NOT NULL with a default. If you find yourself wanting NULL, see the note at
the top: what you want is a three-valued dropdown.
@see published.md