> 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/library/action-nodes/set-selection.md).

# Set selection

The Set selection action node [selects](/reference/platform-concepts/objects.md#object-selection) or unselects an object in a [data source](/reference/apps/data/data-sources.md), updating the **Is Selected** and **Is Not Selected** [object properties](/reference/apps/data/data-sources.md#data-source-object-properties). Set selection can be applied to one or many objects in a single run.

## Usage

This action node is used to control which objects are selected in a particular data source. Selected objects can be used to track user selection of objects from the UI and/or to track which objects a specific action node should operate on. To learn more about the concept of selected objects, see the section [Object selection](/reference/platform-concepts/objects.md#object-selection) under [Objects](/reference/platform-concepts/objects.md).

For operations on large data sources where the result is not immediately required, the action node can be run asynchronously.

## Properties

<table><thead><tr><th width="234">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Operation Type</strong></td><td><p>Apply the chosen select operation to the object(s).</p><ul><li><code>Select</code></li><li><code>Unselect</code></li><li><code>Toggle selection</code> (objects which are selected will become unselected and vice versa)</li></ul></td></tr><tr><td><strong>Selection Type</strong></td><td><p>Define the objects on which to perform the operation.</p><ul><li><code>Object in context</code></li><li><code>First</code></li><li><code>Last</code></li><li><code>Next object</code></li><li><code>Previous object</code></li><li><code>All</code></li><li><code>None</code></li><li><code>Filtered selection</code></li></ul></td></tr><tr><td><strong>Data Source</strong></td><td><em>Available for all</em> <strong>Selection Type</strong> <em>options except Object in context.</em><br><br>Select the data source containing the objects.</td></tr><tr><td><strong>Filter</strong></td><td><em>Available when</em> <strong>Selection Type</strong> <em>is Filtered selection.</em><br><br>Define the <a href="/reference/platform-concepts/filters.md">filter</a> to apply to the data source.</td></tr><tr><td><strong>Keep Existing Selection</strong></td><td><em>Available when</em> <strong>Operation Type</strong> <em>is Select and</em> <strong>Selection Type</strong> <em>is Object in context or Filtered selection.</em><br><br>Retain any existing selection on other objects in the data source.</td></tr><tr><td><strong>Run Asynchronous</strong></td><td>Immediately proceed to the next action node instead of waiting for the result and run the selection operation in parallel. The action node will succeed even if the selection operation fails.<br><br>Use this option if the selection takes a long time and blocks render operations. Do not use this option if the action nodes that follow depend on the result of the selection.</td></tr></tbody></table>


---

# 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/library/action-nodes/set-selection.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.
