> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/database/collections/records.md).

# Records

Browse the records of one collection, sort them, and open the record form.

**Where:** Database → Collections → *collection name* · `/projects/<project>/db/collections/<collection>/records`

The records list shows the data stored in one collection, 10 records per page, with the columns chosen on the schema's [List tab](/codemash/cloud/database/collections/schema-indexes.md). The title shows the collection and its published version, for example **books (v1)**.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-e180815de92ff74d129a5fd355b6239fc422048a%2Frecords-1.png?alt=media" alt="Records list books (v1) with the columns Title, Pages, In stock and Genre and ten rows such as The Silk Roads 636 True history and Postwar 960 True history, each with Edit and Delete...; Add New and the Schema split button at the top right"><figcaption><p>The records of books.</p></figcaption></figure>

## Columns, search and filters

| Column                      | What it shows                                                                                                    |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| One column per chosen field | Set on the schema's **List** tab; every schema field when none is chosen. Yes / no fields show `True` / `False`. |
| (row links)                 | **Edit** opens the record form; **Delete...** asks for confirmation, then deletes.                               |

* **Sort** — click a column header to sort ascending, click again for descending; a new sort starts at page one. Without a click, the **List** tab's default sort applies; without one, the newest records come first.
* **Pages** — **Next** and **Previous** at the bottom.
* **Schema** split button — jumps to the builder tabs **Schema**, **List**, **Triggers** and **Settings**.
* There is no search box; filter records from code (below).
* When the schema was never published, the page says *Schema not published yet* with an **Edit schema** button and **Add New** is off. An empty collection says *No records yet*.

Reading needs `database:read` on the collection (`database:collection:<name>`). Soft-deleted records (schema setting **Soft delete**) are not listed.

## What you can do here

* [Add or edit a record](/codemash/cloud/database/collections/add-records.md) — **Add New**, or **Edit** on a row.
* [Delete a record](/codemash/cloud/database/collections/delete-record.md) — **Delete...** on a row, or **Delete** in the record form.
* [Choose the columns and the default sort](/codemash/cloud/database/collections/schema-indexes.md) — **Schema** → **List**.
* [Edit the schema](/codemash/cloud/database/collections/edit-schema.md) — **Schema** → **Schema**.

## Do it from code

```ts
const { list } = await norbix.api.database.find({
  collectionName: 'books',
  filter: JSON.stringify({ genre: 'history' }),
  pageSize: 5,
});
console.log(list.items.map((b) => b.title));
// [ 'The Silk Roads', 'Postwar', 'SPQR', 'The Guns of August' ]
```

```sh
norbix api database find --collectionName books --filter '{"genre":"history"}' --pageSize 2
```

A filter with `$where`, `$function` or `$accumulator` is refused (`CM-ERRORS-DATABASE-031`). From code a page holds 20 records by default. All rules: [Rules for every record endpoint](/codemash/api-reference/database/collections.md#rules-for-every-record-endpoint). API: [Find](/codemash/api-reference/database/collections/find.md) · [Find One](/codemash/api-reference/database/collections/find-one.md) · [Count](/codemash/api-reference/database/collections/count.md)
