# 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="/pages/-MiR9GGOxcZeghNQPbzV">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: 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/library/action-nodes/set-selection.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.
