> 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/reference/platform-concepts/data-bindings.md).

# Data bindings

Data bindings are used to connect the data in [data sources](https://docs.appfarm.io/reference/apps/data/data-sources.md) to [UI components](#ui-components) and [action nodes](#action-nodes).

## Binding a value

In the data binding picker, select a property of a data source, or a whole data source. For a data source with cardinality many, also choose which objects to use:

* **All**: every object in the data source.
* **Selected** / **Not Selected**: the objects that are selected, or not selected.
* **Filtered**: the objects that match a filter you add.
* **Context / Single Selected**: the object in context (for example the row of a table or list), or, when there is no object in context, the single selected object.

Instead of a data binding, you can use a [function](https://docs.appfarm.io/reference/platform-concepts/functions.md) or a built-in value such as **Date Now** or **Date Today**. Use the [value processor](https://docs.appfarm.io/reference/platform-concepts/value-processor.md) to adjust a bound value before it's used, for example to add days to a date. The same picker is used in apps, Flows and Services.

## UI components

Data bindings are used on [UI components](https://docs.appfarm.io/library/ui-components.md) to both display and modify data. For data input components, like Text edit, the binding is two-way. This means it will both display updates coming from the bound property, as well as send updates back to the bound property when the user edits the text.

Data bindings can also be used to set the value of [boolean properties](https://docs.appfarm.io/reference/apps/ui/component-properties.md#component-properties). For example, if you have an app variable `Show all projects` (boolean), you could bind it to the **Visible** property of a component. The visibility of the component will then be controlled by the value of the app variable.

Other example data bindings include:

* A data source property can be bound to the **Text** property of a [Text component](https://docs.appfarm.io/library/ui-components/text.md) to display text in the UI.
* A data source property can be bound to the **Value** property of a Text edit component to store user input.
* An entire data source can be bound to the **Data Source** property of a [Table component](https://docs.appfarm.io/library/ui-components/table.md) to generate a row for each object.
* As in the screenshot below, an entire data source can be bound to the **Data Source** property of the [List component](https://docs.appfarm.io/library/ui-components/list.md). If the data source is called `Projects` **Primary Text** could be bound to `Projects.Name`. At runtime, this would create a list all projects with the project name.

<div align="center"><figure><img src="https://29237295-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MiLU-xcHu0eLZiTxcmZ%2F-Mk7SvYt5XwB4sVUrRpE%2F-Mk7TRARdobmnZoIYGnv%2Fdata-binding.jpg?alt=media&amp;token=6ede02f2-adc5-463f-a5e0-5e42d8585e8f" alt="A screenshot of adding data bindings to a UI component"><figcaption><p>Adding data bindings to a UI component</p></figcaption></figure></div>

## Action nodes

[Action nodes](#action-nodes) rely on data bindings to know which data to read in and manipulate. For example, a [Create object action node](https://docs.appfarm.io/library/action-nodes/create-object.md) needs to bound to the data source it should create a new object in. You will also want to assign values to the object properties and these can also be data bound, such as setting a value from a runtime data source or app variable.


---

# 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/reference/platform-concepts/data-bindings.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.
