# Grouping records

_How grouping chooses buckets for every field kind, orders them, and interacts with boards and record sorts._

Canonical: https://snoze.dev/help/grouping-records/

Grouping divides a view into buckets using one field. It changes the view, not
the records. A sort still orders records inside each bucket; the group setting
orders the buckets themselves.

## Buckets by field kind

- **Select and Status** make one bucket per configured option, in option order,
  plus **No value**. These kinds can show options that have no matching records.
- **Checkbox** makes **Checked** and **Unchecked** buckets.
- **Number and Time tracking** use numeric bands. `numberBucketSize` is the
  positive width of each band and defaults to 100. Zero, a negative value, or a
  non-finite value falls back to 100.
- **Date** uses relative calendar buckets: **Earlier**, **Today**,
  **Tomorrow**, **Next 7 days**, **Later this month**, then month labels for
  later values. These are not one bucket per day.
- **Created at and Updated at** currently group by their formatted timestamp,
  not by the relative date buckets used for an ordinary Date field.
- **Relation** groups by the field's complete formatted set of linked record
  titles. A record linked to both Design and Engineering is one combined
  `Design, Engineering` bucket; it does not appear once in each linked-record
  bucket.
- **Multi-select, User, File, Formula, Rollup, and all other kinds** also use
  the complete formatted field value. Equal displayed values share a bucket.
  Formula and Rollup therefore group by their rendered result rather than by a
  separately declared result-kind strategy.
- A value the formatter considers empty goes into **No value**.

The relation and timestamp behaviour is a current limitation. Do not build a
workflow that assumes a relation creates one bucket per linked record, or that
every date-like field uses calendar buckets.

## Group settings

A view stores one `group` configuration:

- `fieldKey` selects the field.
- `sort` is `manual`, `ascending`, or `descending`. If it is omitted, Status
  uses manual option order and other kinds use ascending order.
- `hideEmpty` removes empty option buckets. It defaults to `true` outside a
  Board and `false` on a Board.
- `hiddenValues` removes named buckets from presentation without changing the
  records.
- `numberBucketSize` sets the numeric band width described above.

Manual group order comes from the view manifest's `groupOrder`. Values not in
that list follow the listed values. Ascending and descending order use natural,
case-insensitive text comparison on the bucket labels.

## Boards

A Board renders groups as columns. Its group field must be Select or Status.
Dragging a card to another column writes that option to the record. Other view
kinds can group by the broader set above, but they do not gain Board's column
drag behaviour.

See [Sorting records](https://snoze.dev/help/sorting-records/) for the order inside each bucket
and [Filtering records](https://snoze.dev/help/filtering-records/) for excluding records before
grouping.