> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/portals/portal-settings/datasets/items.md).

# Items

Write and manage the records themselves, one row at a time.

The **Items** tab is where the content lives: a table with one column per field you defined under [Fields](/portals/portal-settings/datasets/fields.md).

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FLHxGpPGGc209Yjo7OPNy%2Fimage.png?alt=media&#x26;token=234629f0-cc7c-4070-b4ec-638d010f8cdf" alt=""><figcaption><p>The <strong>Items</strong> tab — one row per record, one column per field.</p></figcaption></figure>

## Working with rows

* **Add item** opens a form built from your fields. **Create another** keeps it open for the next one.
* **Click any cell to edit it in place.** Enter or clicking away saves that one field; Escape discards. A refused edit marks the cell rather than throwing a message at you.
* A row's menu offers **Edit**, **Duplicate** and **Delete**.
* **Drag to reorder.** Only in manual order — clear any search, filter or column sort first, and the table tells you which is in the way. This order is what a section's **Manual order** sort follows.
* **Click a column heading to sort** by it. A third click restores manual order.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FgpUHMhmUWN9RS7QANBqI%2Fimage.png?alt=media&#x26;token=7e435944-baee-4c0f-a09a-8741222edbda" alt=""><figcaption><p>The <strong>New item</strong> form, built from the dataset's own fields.</p></figcaption></figure>

## Published and Draft

Every item has a **Published** switch, on by default. Turn it off and the row becomes a draft: it stays in the table, dimmed, and visitors don't see it — whatever any section's criteria say. Use it for entries waiting on a review.

Drafts are visible to you on the builder canvas too, badged **Draft**, so you can lay out a page around an entry before it goes live.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FUuyAgMKyGdJwP7ghQuXw%2Fimage.png?alt=media&#x26;token=0eef978d-573f-40d9-95a5-f11452020b94" alt=""><figcaption><p>An unpublished item, marked as a draft and kept from visitors.</p></figcaption></figure>

## Finding your way around a big dataset

| Control           | Does                                                                              |
| ----------------- | --------------------------------------------------------------------------------- |
| **Search items**  | Narrows the table.                                                                |
| **Filters**       | Narrows it by the choice fields, with **Clear all** to drop them.                 |
| **Columns**       | Hides columns you're not working on. Remembered per dataset, on this device only. |
| **Rows per page** | How many rows the table shows at once.                                            |
| **Full screen**   | Gives the table the whole window.                                                 |

These only change your view of the table. They are not what visitors see — that's set per section, under [Criteria](/portals/portal-settings/datasets/connect-to-dataset/criteria.md).

When a dataset has translatable fields, a locale switcher appears; the Portal's own language is marked **primary**.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FHi7qLyDKZJEcpJXI3ua6%2Fimage.png?alt=media&#x26;token=24b6c4b5-4eaa-44db-a116-3fbb16ea995c" alt=""><figcaption><p>The locale switcher, shown once a dataset has translatable fields.</p></figcaption></figure>

## Edits are live

Changing an item reaches visitors immediately. You don't republish the Portal for it — that's the point of keeping the content in a dataset rather than typed into a page.

Changing the *fields*, or how a section reads them, is a builder change like any other and does need publishing.

## Editor and JSON

The **Editor / JSON** switch above the tab swaps the table for the rows as a JSON document. The fields they follow stay on the [Fields](/portals/portal-settings/datasets/fields.md) tab — neither document reaches into the other.

It's how you load a lot of content at once: paste a prepared list rather than filling in the form a hundred times.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FDqGx3SSXmvvhwcIw8bAK%2Fimage.png?alt=media&#x26;token=41c23d7e-fb6d-4ad7-825c-4778806f7714" alt=""><figcaption><p>The same rows in <strong>JSON</strong> view, for loading a lot of content at once.</p></figcaption></figure>

| Control                           | Does                                                                |
| --------------------------------- | ------------------------------------------------------------------- |
| **Import JSON**                   | Loads a file into the editor. *File loaded. Review it, then apply.* |
| **Export JSON**                   | Downloads the rows as `<handle>-items.json`.                        |
| **Expand all** / **Collapse all** | Opens or folds the tree, for a long list.                           |
| **Apply**                         | Saves it. **Discard** drops your edits.                             |

A document that isn't valid JSON is refused as **Invalid document** before anything is sent.

{% hint style="warning" %}
**Applying replaces every item in the dataset.** Rows carrying a `uuid` keep their identity and are updated; rows without one are created; and anything missing from the document is deleted. Export first, edit that, and apply it back — don't apply a partial list expecting it to merge.
{% endhint %}

The JSON view is unavailable until the dataset has fields: with none, the switch reads **Add fields first**. There's nothing for a row to hold yet.
