> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/tutorials-1/understanding-flow-types/how-to-set-up-a-configuration-flow-in-fastn/setting-up-a-configuration-flow-with-dynamic-selection-options.md).

# Setting up a Configuration Flow with Dynamic Selection Options

**Dynamic flows** enable you to populate field options in real-time by connecting to live data sources. Instead of using static values, you can fetch options from APIs or other flows, making your configuration adaptive and data-driven.

## **Configuring a Dynamic Selector**

For instance, if you’re building a configuration for a file picker widget, you might include:

* **Array variable (files)** – this represents the list of files that will appear dynamically through a selection flow.

{% hint style="info" %}
In an **array variable**, multiple options can be selected from the widget.\
If you want to allow **only a single option selection**, use an **object variable** instead.
{% endhint %}

> `files` can be defined as an array to allow multiple file selections, or as an object for single file selection.

* Open the three-dot menu next to the field and select **Options**.

<figure><img src="/files/255sdFtMinSKV2YZYz8H" alt=""><figcaption></figcaption></figure>

* Configure the following sections:

#### **Selections Section**

This is where you make the configuration dynamic:

* **Enable Selections** – Turn on dynamic option fetching.
* **Selection Type** – Choose **Dynamic**.
  * *Dynamic selections* fetch their options from another flow in real time (for example, a selection flow that retrieves a list of files).
* **Selection Flow** – Choose which **Selection Flow** will power this dynamic data (e.g., a flow named `getFiles`).

<figure><img src="/files/EPYQLH58ibWreRhNECWd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Once selected, the data returned by that flow (like file names or IDs) will automatically appear in the file picker UI inside your widget.
{% endhint %}

### **Configure Pagination Rules**

For dynamic data sets that return large lists (such as files, customers, or records), define pagination logic within the **Selections** section.

#### **Pagination Settings**

* **Pagination Type:**
  * **Cursor** – Uses a pointer to fetch results in chunks.
  * **Offset** – Uses index-based offsets to load data progressively.

<figure><img src="/files/tCO6vsj3m8dNRviRuemY" alt=""><figcaption></figcaption></figure>

* **Limit:**\
  Defines the number of records to retrieve per chunk.\
  For example, setting a limit of `50` means results will be fetched in batches of 50.

The pagination ensures smoother UI performance and prevents timeouts when loading large data sets.

### **Link to a Selection Flow**

After configuring pagination, select the **Selection Flow** that will supply your data dynamically.\
For example:

* **Selection Flow:** A flow that defines the selection of your Google files.

<figure><img src="/files/3F0EKCeAch2EKJ0C6JrG" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When you save this configuration, your widget’s file picker will use the `Gcsgetfiles` flow to fetch available files dynamically.
{% endhint %}

> Users will then see a **file picker UI** that allows them to select files based on live data returned by that selection flow.

### **How It Appears in the Widget?**

Once saved, the configuration flow appears inside your widget as a **file picker** (or equivalent dynamic component).

\
The widget automatically:

* Fetches available options using the connected selection flow.

<figure><img src="/files/sMd4lcHldlS5KFe8CemW" alt=""><figcaption></figcaption></figure>

* Applies pagination rules (Cursor/Offset + Limit).

<figure><img src="/files/OMkZwCeJHSvTUxnHTaNN" alt=""><figcaption></figcaption></figure>

* Reflects the field behaviors you set (hidden, disabled, or dependent visibility).

<figure><img src="/files/hbzXH2nTtYnUQXxUMROU" alt=""><figcaption></figcaption></figure>

> This creates a seamless dynamic experience, allowing end-users to select real-time data (e.g., files, connectors, records) directly from your Fastn widget.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fastn.ai/tutorials-1/understanding-flow-types/how-to-set-up-a-configuration-flow-in-fastn/setting-up-a-configuration-flow-with-dynamic-selection-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
