# Get value by index

This is a pre-built Action located under the Captured Dropdown Element from the Desktop Application. The functionality of this Action in Avo Assure is to fetch the dropdown value based on the index provided in the input. The result is stored in the given dynamic variable for further use during test execution.

## Syntax

**Input Value**: `<Index Value>`&#x20;

| Argument                               | Description                                                               |
| -------------------------------------- | ------------------------------------------------------------------------- |
| <p>\<Index Value></p><p>(Required)</p> | Provide the numerical value which you want to retrieve from the dropdown. |

{% hint style="info" %}
**Note**:

* Only numerical values are allowed in input.
* In the above syntax, the Index always starts from 0
  {% endhint %}

&#x20;**Output Value**: `<Dynamic Variable>;<Dynamic Variable>(Optional)`

<table><thead><tr><th valign="top">Argument </th><th valign="top">Description </th></tr></thead><tbody><tr><td valign="top"><p>&#x3C;Dynamic Variable></p><p>(Required)</p></td><td valign="top">This dynamic variable stores the retrieved value from the dropdown.</td></tr><tr><td valign="top"><p>&#x3C;Dynamic Variable></p><p>(Optional)</p></td><td valign="top">This dynamic variable stores the status as <strong>True</strong> or <strong>False</strong>.</td></tr></tbody></table>

### **Example: Retrieving a Value from a Dropdown using an Index Position**

In this example, we explain how to fetch a specific value from a dropdown using its index.

* **Action**: Get value by index
* **Input Value**: 4
  * The argument (**4**) specifies the index position from which the value should be retrieved.
* **Output Value:** {Value}
  * The retrieved dropdown item is (Last 3 Month) stored in the **{Value}** dynamic variable.
  * If a second output variable is defined, it stores the action status with the following possible values:
    * **True**: If the value is retrieved successfully.
    * **False**: If the value is not retrieved successfully.
* **Logical Explanation:** The **Get value by index** action reads the value from the **Input Value** column (**4**) and retrieves the item located at index position 4 in the dropdown. The fetched value is (Last 3 month) stored in the **{Value}** variable.

<figure><img src="/files/r8lS1s9yWweh0nImBPsa" alt=""><figcaption></figcaption></figure>


---

# 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.avoautomation.com/avo-assure/actions/desktop/dropdown-1/get-value-by-index.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.
