> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/ui-components/multi-select.md).

# Multi select

The **Multi Select** allows the user to perform a selection of zero to many entries in a droplist. Its functionality is essentially the same as the **Select** component, but the user can select more than one object.

{% hint style="info" %}
Showroom: [Multi Select example](https://showroom.appfarm.app/ui-components/multiselect), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

## Properties

### Read Only and Disabled

Set **Read-only** or **Disabled** to `true`, or bind them to a boolean value, to prevent the user from changing the selection.

### Selection Type

The Multi select component has two selection types - `Basic` and `Property`. Default is `Basic`.

* `Property` allows the user to choose an entry from a list of options, and the option selected is stored in a [Many-cardinality](https://docs.appfarm.io/reference/data-model/object-class-properties.md) property or variable (defined by the `Value` setting). The `Value` can be a multi-reference or a multi-enum property. For a multi-enum property, use **Conditional options** to limit which enum values can be selected.\
  **Example**: A droplist where you select the `Tags`for a `Person`. The Value is `Person.Tags` (multi-reference). The options are the `Tags` data source.
* `Basic` allows the user to select one or many entries from a list of options, and when an entry is selected, that entry is marked as [selected](https://docs.appfarm.io/reference/platform-concepts/objects.md#object-selection) in the data source holding the options.\
  **Example**: A data source `Projects` holds all projects you have access to. When selecting two Projects in the list, those projects are marked as selected. This is useful when you have a UI that displays information about the selected Projects, and for example, if you have a `Tasks` data source that is filtered towards the selected Projects.

### Options

Select the Data Source that holds the options that the user can choose from.

### Display value

Select which **property** of the Data Source (selected as Option) that should be displayed for the options of the Multi Select.

### Filter

If you do not want all entries of the Data Source to be selectable, you may apply a filter here to limit the rows of the Multi Select.

### Conditional filters

You may also choose to have a dynamic filter on the Data Source, that is applied given certain conditions.

### Autocomplete

If the list of options is long, you should consider checking this setting. It allows for searching the options of the Multi Select.

When **Autocomplete** is checked, these settings are available:

* **Limit tags**: The maximum number of selected tags to display.
* **Overflow text**: Shown when **Limit tags** is set. The text to display when more tags are selected than shown. Use Mustache syntax to insert parameters, for example `+ {{excessTagsCount}}`.
* **Persistent input**: Keep the typed search text after an option is selected.

### Error

Select a value to assign an error state to the component.

### Other properties

* **Label**, **Placeholder**, **No options text** and **Helper text**: Texts shown in and around the field.
* **Auto focus**: Focus the field when it is shown.
* **Tab index**: Set the tab order of the field.

### Appearance

Set the **Variant**, **Size** (default Medium), **Margin** (default Normal) and **Color** (default Primary) of the field. **Disable underline** is available when the variant is not Outlined.

### Event handlers

Event Handlers can detect a specific event occurring in Appfarm Create and can link these events to actions. Three Event Handlers are available for the **Multi select** component:

**On value change**: This Event Handler will run an action when a change is detected in the data source bound to the component. For example, if the data input changes from false to true, or vice versa, a specific action can be performed.

**On open**: Specify an action to run when the droplist is opened.

**On close**: Specify an action to run when the droplist is closed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/ui-components/multi-select.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
