> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/actions/data-conversion-and-formatting/text-collection-to-combobox-options.md).

# Text Collection to Combobox Options

Turn a Text Collection into options for the Avonni Combobox, each text becoming one option, so a list the flow already holds can fill a dropdown.

## Overview

This action turns a Text Collection into a collection of options for the [Avonni Combobox](/flow/flow-components/combobox.md). Each text becomes one option, used as both its label and its value. The Combobox cannot take a Text Collection directly as a **Variable** data source, so this action sits in between.

> **Example:** On screen 1 a support agent ticks every case reason that applies. On screen 2, a second Combobox offers only those reasons and asks for the primary one.

***

## Input

| Field                 | Required | What to set                                                                                                                                                                                                                         |
| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Source Collection** | Yes      | A Text Collection variable, for example the **Value Collection** output of another Combobox, or the result of [Split Text to Text Collection](/flow/actions/data-manipulation-and-transformation/split-text-to-text-collection.md). |

## Output

A collection of combobox options (Apex-defined type `ComboboxOption`). Store it in a collection variable of that type, then select the variable in the Combobox with **Data Source** set to **Variable**.

| Source Collection                 | Options in the Combobox (label and value) |
| --------------------------------- | ----------------------------------------- |
| `New problem`, `Existing problem` | New problem, Existing problem             |
| an empty entry                    | an option with an empty label             |

The options have no secondary text, icon, or disabled state. For those, type the options with the **Manual** data source or use [New Combobox Option Collection](/flow/actions/ui-and-navigation/new-combobox-option-collection.md).

***

## Example

1. Add an Action element after screen 1 and select **Text Collection to Combobox Options**.
2. Set **Source Collection** to the **Value Collection** of the Reasons Combobox.
3. Store the output in a new variable: Data Type **Apex-Defined**, Apex class `ComboboxOption`, **Allow multiple values (collection)** selected.
4. On screen 2, set the Primary Reason Combobox **Data Source** to **Variable** and select that variable.

[Build Combobox Options](/flow/tutorials/components/combobox/build-combobox-options.md) compares this action with the other ways to fill a Combobox.


---

# 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.avonnicomponents.com/flow/actions/data-conversion-and-formatting/text-collection-to-combobox-options.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.
