Skip to main content

Build a data model

A model is the shape of a dataset — its fields and their types. Records you add or import in the console, or write through the REST API, are validated against it.

Plan availability

Starter and above. Free plans have no data store; add-ons raise the dataset cap.

The data page with a dataset open

Define the model​

  1. In Data, create a dataset and open the schema dialog.
  2. Add typed fields — text, number, date, reference, image, page, page address, and more.
  3. Save. The model is stored on the dataset. Every write validates records against it — the console, the REST API, a bound form and an automation step — and stores each value as its field's type. A record with a value that doesn't fit is not written.

Display name vs reference ID​

Every field has two names:

  • Display name — the human label shown in the record editor, table headers, and anywhere the field appears. Rename it any time.
  • Reference ID — the stable key used in bindings ({{item.reference_id}}), form field mappings, and CSV import/export.

When you create a field, the Reference ID auto-fills from the display name (for example, Roast preference → roast_preference). Edit it in the same dialog to set your own — handy when you want a short, code-friendly key that differs from the label. Once the field is created the ID is fixed: records, bindings, and forms all point at it, so it can't change without orphaning that data. Pick it deliberately, then rename the display name freely afterward.

Page address fields​

A Page address field holds a record's own segment of its address when the dataset has a record template: kitchen-remodeling, roof-repair. Pick Page address in the field's type list. Its values are lowercase letters and numbers joined by hyphens, up to 64 characters.

  • Fill in from names a text field, such as Name, that an empty address is made from. It fills in once, when a record is first saved without one, and a record keeps its address when it's renamed, so a live page never moves.
  • Whatever writes the record — the console, an import, the REST API, a form or an automation — the address is filled in the same way and tidied into that form, so Kitchen Remodeling is stored as kitchen-remodeling.
  • A dataset with records already in it can get the field in one step: Make addresses, in a record template's settings, adds it and gives every record an address, made unique where two names collide (roofing, roofing-2).

See Service and location pages from a dataset for how the pages are built.

Image fields​

An Image field holds a record's photo: a portfolio piece, a dish, a team member. Pick Image in the field's type list. In the record editor, press Choose from media and pick a photo from your media library — this site's files or your organization's. The editor shows a preview, with Change photo and Remove beside it. A chosen photo is kept by identity, so moving it to another folder or replacing the file never breaks the record. For a photo hosted on another website, press Use a link instead.

To show the photo, select an Image inside a repeat or on a record template, press the {} button beside its Image source, and pick the field from the record's group. When Aglyn AI builds a dataset for a list people look at, such as pieces, a menu or classes, it adds this field and gives each record a stock photo you can replace.

Icon fields​

An Icon field gives each record its own icon: an integration's logo mark, a service, a perk. Pick Icon in the field's type list. In the record editor, press Choose icon and pick one from the same icon library the Icon element offers. The records list shows each record's icon beside its name.

To show it, select an Icon inside a repeat or on a record template, press the {} button beside its Icon, and pick the field from the record's group. Each copy of the repeat then shows its own record's icon, on the live site as in the Besigner.

Page fields​

A Page field links a record to one of your site's pages: each service to the page about it, each location to its own page. Pick Page in the field's type list. In the record editor the field is a list of the site's pages by name; pick one, or No page.

To link to it, select a Button or Link inside a repeat, press the {} button in its External URL, and pick the field from the record's group. The link goes to the page itself, not to an address typed for it, so it follows the page wherever it goes: rename the page or move it under another one and every record that names it still links to it.

A page belongs to one site, so the list shows the pages of the site whose Data page you opened the dataset from. On the organization Data page, open the dataset from a site's Data page to choose its pages. When Aglyn AI builds a dataset with a Page field, it leaves the field empty for you to pick.

Edit records​

Open the typed document editor to add and edit records. Each field renders the input for its type (a date picker for dates, a number field for numbers, and so on), which keeps data consistent.

Tips​

  • Model the data first, then bind it — a clean model makes repeatable components and bindings straightforward.
  • Give fields a description in the schema dialog — it appears as a hint in the record editor, as a tooltip on table headers, and under the field's name in the schema dialog itself. See naming & describing fields.
  • Use a reference field to link records; see relations.