> This page refers to the `suggestions` parameter that is part of a [dimension](https://docs.cloud.google.com/looker/docs/reference/param-field-dimension.md.txt), [filter field](https://docs.cloud.google.com/looker/docs/reference/param-field-filter.md.txt), or [parameter](https://docs.cloud.google.com/looker/docs/reference/param-field-parameter.md.txt).
>
> You can also use `suggestions` as part of a [view](https://docs.cloud.google.com/looker/docs/reference/param-view-view.md.txt), as described on the [`suggestions` (for views)](https://docs.cloud.google.com/looker/docs/reference/param-view-suggestions.md.txt) parameter documentation page.

## Usage

```
view: view_name {
  dimension: field_name {
    suggestions: ["suggestion string", "suggestion string", "..."]
  }
}
```

|---|---|
| Hierarchy [View File](https://docs.cloud.google.com/looker/docs/reference/param-view.md.txt) [`view`](https://docs.cloud.google.com/looker/docs/reference/param-view-view.md.txt) [Field Type](https://docs.cloud.google.com/looker/docs/reference/param-field.md.txt) `suggestions` | Possible Field Types Dimension, Filter, Parameter <br /> Accepts A string or a list of strings <br /> |

## Definition

When a user [filters an Explore](https://docs.cloud.google.com/looker/docs/filtering-and-limiting.md.txt) on a [field type that supports suggestions](https://docs.cloud.google.com/looker/docs/changing-filter-suggestions.md.txt#fields_that_support_suggestions), by default Looker will suggest possible values for the field (see [Changing filter suggestions](https://docs.cloud.google.com/looker/docs/changing-filter-suggestions.md.txt) for information about how you can affect filter suggestions). To provide suggestions for a filter field, Looker executes a query on your database to retrieve a list of distinct values for the field. Looker typically generates these suggestions by executing a query such as the following on the filter field:

    SELECT DISTINCT field_name FROM table
    WHERE (field_name LIKE '%' OR field_name LIKE '% %')
    GROUP BY 1 ORDER BY 1 LIMIT 1000

The `suggestions` parameter lets you hard-code the list of suggested values for a
[dimension](https://docs.cloud.google.com/looker/docs/reference/param-field-dimension.md.txt), [filter field](https://docs.cloud.google.com/looker/docs/reference/param-field-filter.md.txt), or [parameter](https://docs.cloud.google.com/looker/docs/reference/param-field-parameter.md.txt) that will appear when someone uses that field to filter a query.

> [!NOTE]
> **Note:** Although Looker caches up to 1,000 results for this query, only the first 100 results appear to the user as filter suggestions.

If the field is in a large table, this query can be too slow or create too large a database load. By using `suggestions` you can hard-code a list of possible values instead and improve performance.

The `suggestions` parameter is also useful because it lets you specify a more limited list if you don't want certain values from a field to appear as suggestions.

> [!CAUTION]
> **Caution:** The `label` values from the [`case`](https://docs.cloud.google.com/looker/docs/reference/param-field-case.md.txt) parameter will take precedence over suggestions presented to users from the `suggestions` parameter.

## Examples

Replace the default suggestions for the `colors` dimension with a hard-coded list:

    dimension: colors {
      type: string
      sql: ${TABLE}.colors ;;
      suggestions: ["red", "yellow", "blue"]
    }