# Get Value by Index

This is pre-built Action located under the **@Custom Element**, instructs the Avo Assure to retrieve the selected value from the dropdown or list specified in the input and store the result in the dynamic variable.

### Syntax

**Input Value:** `<ObjectType>;<VisibleText(optional)>;<Index>;<IndexValue>;<abs(optional)>`

| Argument                            | Description                                                                                                    |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| <p>\<ObjectType><br>(Required)</p>  | Specify the type of object (e.g., select, Dropdown, list)                                                      |
| <p>\<VisibleText><br>(Optional)</p> | Enter the visible text on the object                                                                           |
| <p>\<Index><br>(Required)</p>       | Provide the index of the object inside the page                                                                |
| <p>\<IndexValue><br>(Required)</p>  | Specify the index of the dropdown option to retrieve its corresponding value from the dropdown or list.        |
| <p>\<abs><br>(Optional)</p>         | If the **abs** is provided, the action is performed with absolute identification using the **absolute X path** |

{% hint style="warning" %}
**Note:**\
If the abs argument is specified, then the action will be executed with absolute performance based on the given visible text.

*To skip an optional input value, use an extra semicolon (;).*
{% endhint %}

#### **Output Value**

| Argument                                 | Description                                                                      |
| ---------------------------------------- | -------------------------------------------------------------------------------- |
| <p>\<Dynamic Variable><br>(Required)</p> | This dynamic variable holds the value retrieved from the dropdown at given index |
| <p>\<Dynamic Variable><br>(Optional)</p> | This dynamic variable holds the action result in **True** or **False**           |

**Example**

**Retrieves a specific value from the given object based on the index value**

The **Get Value by Index** action takes the value from the Input Value column (e.g., **select;;0;3**) and fetches the element present at the specified index within the object. The result of the fetch operation is stored in the **{Get Value}** variable, while the execution status is stored in the **{Status}** variable, with the following possible values:

* **True** – if the value is retrieved successfully.
* **False** – if retrieval fails

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F0WxeW2GTPCvCKhDQ8Wuz%2Fimage.png?alt=media&#x26;token=1dff2811-8e98-4a89-9961-dae1330a9e16" alt=""><figcaption></figcaption></figure>
