> ## Documentation Index
> Fetch the complete documentation index at: https://flatfileinc-remove-rss-json.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.

<ParamField path="config.appearance" type="object">
  Controls the visual presentation of the string field in the interface.
</ParamField>

<ParamField path="config.appearance.width" type="number">
  The width of the column in pixels.
</ParamField>

```json theme={"system"}
{
  "key": "currency",
  "label": "Product Code",
  "type": "string",
  "config": {
    "appearance": {
      "width": 200
    }
  }
},
```

## `string-list`

<Snippet file="shared/advanced_mapping_required.mdx" />

A property that stores an array of strings. This is useful for fields that need to contain multiple text values.

```json theme={"system"}
{
  "key": "tags",
  "label": "Tags",
  "type": "string-list"
}
```

## `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.decimalPlaces" 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.
  @deprecated Use data hooks for decimal place formatting instead.
</ParamField>

```json theme={"system"}
  {
    "key": "price",
    "label": "Retail Price",
    "type": "number",
    "config": {
      "decimalPlaces": 2
    }
  },
```

## `reference`

Defines a singular one-to-one reference to a field another sheet.

<ParamField path="config.ref" required>
  The sheet slug of the referenced field. Must be in the
  same workbook.
</ParamField>

<ParamField path="config.key" default="id" type="string">
  The key of the property to use as the reference key.
</ParamField>

```json theme={"system"}
 {
        "key": "author",
        "type": "reference",
        "label": "Authors",
        "config": {
          "ref": "authors",
          "key": "name"
        }
      },
```

## `reference-list`

<Snippet file="shared/advanced_mapping_required.mdx" />

Defines a reference list referencing a column in another sheet. Enables including
multiple values from the given data field.

<ParamField path="config.ref" required>
  The sheet slug of the referenced field. Must be in the
  same workbook.
</ParamField>

<ParamField path="config.key" default="id" type="string">
  The key of the property to use as the reference key.
</ParamField>

```json theme={"system"}
 {
    "key": "author",
    "type": "reference-list",
    "label": "Authors",
    "config": {
      "ref": "authors",
      "key": "name"
    }
  },
```

## `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-list` type.

<ParamField path="config.allow_custom" default="false" type="boolean">
  Permit the user to create new options for this specific field. When enabled, users will be able to import their custom value to the review table but it will not be considered a valid enum option.
</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 theme={"system"}
{
  "key": "status",
  "label": "Status",
  "type": "enum",
  "config": {
    "options": [
      {
        "value": "active"
      },
      {
        "value": "inactive",
        "label": "Disabled",
        "meta": {
          "foo": "bar"
        }
      }
    ]
  }
},
```

## `enum-list`

<Snippet file="shared/advanced_mapping_required.mdx" />

Similar to `enum` type but allows multiple selections from the options list. The values are stored as an array.

```json theme={"system"}
{
  "key": "categories",
  "label": "Categories",
  "type": "enum-list",
  "config": {
    "options": [
      {
        "value": "electronics",
        "label": "Electronics"
      },
      {
        "value": "clothing",
        "label": "Clothing"
      }
    ]
  }
}
```

## `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.

<ParamField path="config.allowIndeterminate" default="false" type="boolean">
  Allow a neither true or false state to be stored as `null`.
</ParamField>

```json theme={"system"}
{
  "key": "is_active",
  "label": "Active",
  "type": "boolean",
  "config": {
    "allowIndeterminate": true
  }
}
```

## `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.

```json theme={"system"}
{
  "key": "start_date",
  "label": "Start Date",
  "type": "date"
}
```
