# 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="/files/-Mk7TRARdobmnZoIYGnv" 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: 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:

```
GET https://docs.appfarm.io/reference/platform-concepts/data-bindings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
