> 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](/reference/apps/data/data-sources.md) to [UI components](#ui-components) and [action nodes](#action-nodes).

## UI components

Data bindings are used on [UI components](/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](/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](/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](/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](/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](/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.
