Add a computed status column
Goal: a column that reads itself from the fields already on an item, so you never type or update it. A "when is this next due" line, a display name built from three fields, a one-glance status.
Modules: any module with the items you want the field on. Computed fields are part of the field system, so this works anywhere.
Steps
-
On the kind you want it on, add a field of type computed. Instead of a value you type in, a computed field carries a template in double braces that Cobblr fills from the item's other fields.
-
Write the template. Two things it can read:
- The item's own fields. A vehicle's display name can be
{{ year }} {{ make }} {{ model }}, which renders "2022 Toyota Corolla" without retyping it. A quantity line can be{{ qty }} {{ unit }}. - Related data a module exposes, under its namespace. With Maintenance on,
a machine can show
Last: {{ maintenance.last_performed }}.
- The item's own fields. A vehicle's display name can be
-
Format dates with the
relativefilter so they read like a person would say them:Next service {{ maintenance.next_scheduled_at | relative }}renders "in 6 days" or "2 weeks ago". Cover empty values with a fallback:{{ warranty_ends | default: "no warranty" }}. -
Save it, then add it as a column in a table view (or show it on the kanban card). It reaches every read path the same way: list rows, the detail page, search, export, and a public surface.
Result
A column that's always current because it's worked out fresh each time an item is shown. You never edit it. Change one of the underlying fields and the computed value follows. It's read-only by design, so it can't drift out of sync with the data it summarizes.