> ## Documentation Index
> Fetch the complete documentation index at: https://flatfileinc-docs-update-8de3b114-e6aa-4417-a753-2ecef733a0d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Field Types

> supported field types

## `string` *(default)*

A property that should be stored and read as a basic string.

```json
{
  "key": "currency",
  "label": "Product Code",
  "type": "string"
},
```

## `number`

A property that should be stored and read as either an integer or floating point
number. Database engines should look at the configuration to determine ideal
storage format.

<ParamField path="config.decimal_places" default="0" type="number">
  The number of decimal places to preserve accuracy to. Overages should be
  automatically rounded with a warning. A hook can pre-format to accomplish
  floor or ceiling.
</ParamField>

```json
  {
    "key": "price",
    "label": "Retail Price",
    "type": "number",
    "config": {
      "decimal_places": 2
    }
  },
```

## `reference`

Defines a reference to another sheet. Links should be established automatically
by the matching engine or similar upon an evaluation of unique or similar
columns between datasets.

<ParamField path="config.ref" required>
  The full path reference to another sheet/table configuration. Must be in the
  same workbook.
</ParamField>

<ParamField path="config.relationship" required>
  The type of relationship this defines. Can be `has-one`
</ParamField>

## `enum`

Defines an enumerated list of options for the user to select from. Matching
tooling attempts to resolve incoming data assignment to a valid option. The
maximum number of options for this list is `100`. For larger lists, users should
use the `reference` or future `lookup` types.

<ParamField path="config.allow_custom" default="false" type="boolean">
  Permit the user to create new options for this specific field.
</ParamField>

<ParamField path="config.sortBy" default="label" type="string">
  The field to sort the options by (label, value, ordinal)
</ParamField>

<ParamField path="config.options" required>
  An array of valid options the user can select from
</ParamField>

<Expandable title="options" type="array" defaultOpen={true}>
  <ParamField path="value" required>
    The value or ID of this option. This value will be sent in egress
  </ParamField>

  <ParamField path="label" default="value" type="string">
    A visual label for this option, defaults to value if not provided
  </ParamField>

  <ParamField path="meta" type="object">
    An arbitrary JSON object to be associated with this option and made available to hooks
  </ParamField>

  <ParamField path="ordinal" type="number">
    The ordinal position of this option in the list. Only used if `sortBy` is set to `ordinal`. Options are sorted in ascending order.
  </ParamField>
</Expandable>

```json
{
  "key": "status",
  "label": "Status",
  "type": "enum",
  "config": {
    "options": [
      {
        "value": "active"
      },
      {
        "value": "inactive",
        "label": "Disabled",
        "meta": {
          "foo": "bar"
        }
      }
    ]
  }
},
```

## `boolean`

A `true` or `false` value type. Matching engines should attempt to resolve all
common ways of representing this value and it should usually be displayed as a
checkbox.

```json
{
  "key": "is_active",
  "label": "Active",
  "type": "boolean"
}
```

## `date`

Store a field as a GMT date. Data hooks must convert this value into a
`YYYY-MM-DD` format in order for it to be considered a valid value. Datetime is
not currently available, but will be a separately supported Field Type in the
future, and will include timezone.
