# Select Multiple Value by Indexes

This is a pre-built Action located under the captured list element. The functionality of this Action in Avo Assure is to select multiple values from the list based on the index numbers provided in the input value. The result is stored in the given dynamic variable for further use during test execution.

## **Syntax**

**Input Value**: `<Index1>;<Index2>;<...>`

| Argument                                       | Description                                                                      |
| ---------------------------------------------- | -------------------------------------------------------------------------------- |
| <p>\<Index1>;\<Index2>;<...><br>(Required)</p> | Provide the index of the list of items from which you want to select the values. |

{% hint style="info" %}
**Note**: In the above syntax, the Index always starts from 0.
{% endhint %}

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

| Argument                                                    | Description                                                       |
| ----------------------------------------------------------- | ----------------------------------------------------------------- |
| \<Dynamic Variable>(Optional);\<Dynamic Variable>(Optional) | This dynamic variable stores the status as **True** or **False**. |

### Example: Selecting Multiple Values from a List Using Index Positions&#x20;

In this example, we explain how to select multiple values from a list using their index positions.&#x20;

* **Action**: Select Multiple Values by Indexes&#x20;
* **Input Value**: 2;3&#x20;
  * The first argument (**2**) specifies the index of the first value to be selected.&#x20;
  * The second argument (**3**) specifies the index of the second value to be selected.&#x20;
* **Output Value**: {Status}&#x20;
  * The execution status of the selection operation is stored in the **{Status}** dynamic variable with the following possible values:&#x20;
    * **True**: If all values are selected successfully.&#x20;
    * **False**: If all values are not selected or If Input Value is not provided.&#x20;
* **Logical Explanation**: The **Select Multiple Values by Indexes** action takes the value from the **Input Value** column (**2;3**) and selects items of the list located at index positions 2 and 3 within the targeted list element. The status of the selection operation (**True**) is stored in the **{Status}** variable.&#x20;

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FySMkybsMFSG7JzjlRKqD%2Funknown.png?alt=media&#x26;token=bcf15df9-c88d-4bc5-a698-d59596c0796a" alt=""><figcaption></figcaption></figure>
