---
title: tm.fielddefinition
slug: db/tmfielddefinition
createdAt: 2023-12-14T14:12:42.127Z
---

A field definition represents a specific information element of an order, contact, event or ticket. For example a contact firstname or an order creation time.

## Fields

| FIELD         | TYPE        | DESCRIPTION                                                                                                                                                     |
| ------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id            | `int`       | Unique ID                                                                                                                                                       |
| typeid        | `int`       | Type ID                                                                                                                                                         |
| key           | `string`    | Key for the field definition. Should only consist of lowercase alphanumeric characters                                                                          |
| description   | `mlstring`  | Human-readable name for the field definition                                                                                                                    |
| sqlclause     | `string`    | The actual definition of the field definition. Contains the sql clause that will retrieve the information element in the database.                              |
| width         | `int`       | Width of the field definition, when used in a view                                                                                                              |
| align         | `string`    | Alignment of the field definition, when used in a view. Values can be 'left', 'right' or 'center'                                                               |
| uitype        | `string`    | Will decide how the field will be rendered when used in a view.                                                                                                 |
| variablewidth | `bool`      | Indicates whether the width for the field definition can be adapted when stretching a view that includes the field definition across the whole available width. |
| createdts     | `timestamp` | Created timestamp                                                                                                                                               |
| lastupdatets  | `timestamp` | Last updated timestamp                                                                                                                                          |
| isarchived    | `bool`      | Whether or not this item is archived                                                                                                                            |

