Fields and Types
Collection fields define the schema of your data. Learn about the available field types, validation rules, and configuration options.
Each collection has a set of fields that define its schema. Fields are similar to columns in a database table — they specify the type of data stored, validation rules, and display configuration.
Field types
The platform supports a wide range of field types:
Basic types
| Type | Description | Example values |
|---|---|---|
| text | Single-line or multi-line text | "John Doe", "A longer description..." |
| number | Numeric values (integer or decimal) | 42, 3.14, -100 |
| date | Date and/or time values | "2025-03-15", "2025-03-15T10:30:00Z" |
| checkbox | Boolean true/false | true, false |
| url | Web URLs | "https://example.com" |
| Email addresses | "[email protected]" | |
| phone | Phone numbers | "+1-555-0123" |
Choice types
| Type | Description | Configuration |
|---|---|---|
| select | Single selection from predefined options | Define options with labels, values, and optional colors |
| multiselect | Multiple selections from predefined options | Same as select, but allows multiple values |
Relational types
| Type | Description | Configuration |
|---|---|---|
| link | Reference to a record in another collection | Specify the target collection and display field |
Link fields create relationships between collections, similar to foreign keys in relational databases. When querying records with link fields, the platform can JOIN related data automatically.
Computed types
| Type | Description | Configuration |
|---|---|---|
| formula | Computed value based on other fields | Define the formula expression |
| rollup | Aggregated value from linked records | Specify the link field, target field, and aggregation function (sum, count, avg, etc.) |
File types
| Type | Description |
|---|---|
| attachment | File uploads associated with a record |
Field properties
Each field has common properties regardless of type:
| Property | Description |
|---|---|
| name | Unique field identifier within the collection |
| title | Human-readable display name |
| kind | The field type (text, number, date, etc.) |
| required | Whether the field must have a value for every record |
| description | Help text displayed in the UI |
| default | Default value for new records |
Validation
Fields support validation rules defined as JSON Schema constraints:
- Text fields — min/max length, pattern (regex)
- Number fields — min/max value, integer vs decimal
- Date fields — min/max date range
- Select fields — values must match defined options
Validation is enforced when records are created or updated. Invalid data is rejected with a descriptive error.
Link field configuration
Link fields create relations between collections. Configuration includes:
- Target collection — which collection the link points to
- Display field — which field from the target collection to show as the link label
- Relationship type — how records are related
When querying records that have link fields, the platform can automatically JOIN the related data, returning the linked record's fields alongside the source record.
Related concepts
- Records — working with data in collections
- Views — filtering and sorting records
- Collections overview — the broader data storage model
Collections
Collections provide structured data storage on the platform. Bases contain collections (tables) with typed fields, validation rules, relations, and views.
Records
Records are the data entries within a collection. Learn how to create, read, update, delete, and query records with filters, sorting, and pagination.