# Parameter Types

There are several types of parameters, depending on the type of input form generated and the data type.

## 1. Text input (`STRING`) <a href="#text-input" id="text-input"></a>

Simple string input field.

* Format:
  * Escaped as a string in SQL.
  * Ex: Converted to `'val1'`
* If empty:
  * `''`

## 2. Text multi input (`STRING[]`) <a href="#text-multi-input" id="text-multi-input"></a>

A field for entering multiple strings.

* Format:
  * Escaped as a comma-separated string in SQL.
  * Ex: Converted to `'val1', 'val2'`
* If empty:
  * `''`

## 3. Text select (`STRING`) <a href="#text-select" id="text-select"></a>

A dropdown to select a single string value.

* Source options:
  * Fixed list or table values or query results.
* Format:
  * Escaped as a string in SQL.
* If empty:
  * `''`

## 4. Text multi select (`STRING[]`) <a href="#text-multi-select" id="text-multi-select"></a>

A dropdown for selecting multiple string values.

* Source options:
  * Fixed list or table values or query results.
* Format:
  * Escaped as a comma-separated string in SQL.
  * Ex: Converted to `'val1', 'val2'`
* If empty:
  * `''`

## 5. Number input (`NUMBER`) <a href="#number-input" id="number-input"></a>

A simple numeric input field.

* Options:
  * min, max, steps (intervals)
* If empty:
  * `0`

## 6. Number select (`NUMBER`) <a href="#number-select" id="number-select"></a>

A dropdown for selecting a single number.

* Source options:
  * Fixed list or table values or query results.
* If empty:
  * `0`

## 7. Date input (`DATE`) <a href="#date-input" id="date-input"></a>

A simple date input field. Allows selection from a calendar or by entering a date.

* Options:
  * `Unit`:
    * Date, Week, Month, Year
  * `Start day of week` (First day displayed in calendar):
    * Sun, Mon, Tue, Wed, Thu, Fri, Sat
  * `Relative valid range`:
    * `Days before today`: Dates earlier than this limit become unselectable. For example, entering '90' will make dates earlier than 90 days unselectable.
    * `Days after today`: Dates beyond this limit become unselectable. For example, entering `0` will make dates from the next day onwards unselectable, and entering `-1` will make dates from today onwards unselectable.
  * `Absolute valid range`:
    * `Lower date`: Dates before this specified date become unselectable.
    * `Upper date`: Dates after this specified date become unselectable.
* Format:
  * Expanded in `yyyy-MM-dd` format as a string in SQL.
  * Ex: Converted to `'2024-01-01'`
* If empty:
  * `'1970-01-01'`
* You can set [relative dates](https://docs.codatum.com/data-exploration/parameter-overview/relative-date-behavior) using default values.

## 8. Date range (`[DATE, DATE]`) <a href="#date-range" id="date-range"></a>

Specifies a start and end date as a pair.

* Options:
  * Identical to those for Date Input (DATE)
* Syntax for SQL reference:
  * Start Date: `{{param_name}}.StartDate`
  * End Date: `{{param_name}}.EndDate`
* If empty:
  * Start date and end date are both `'1970-01-01'`
* You can set [relative dates](https://docs.codatum.com/data-exploration/parameter-overview/relative-date-behavior) using default values.

## 9. Checkbox (`BOOLEAN`) <a href="#checkbox" id="checkbox"></a>

Simple Boolean checkbox.

* Format:
  * Expanded as `true` or `false` in SQL.
