# Else

This is a pre-built Action located under the **@Generic Element**. The functionality of this Action in Avo Assure is to execute the alternative condition steps when the specified If condition evaluates to false. The **Else** part is executed, and the result is stored in the given dynamic variable for further use during test execution.

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

* The **Else** action depends on an **If** action and does not operate independently.
* The **Else** action requires a corresponding **EndIf** action to properly close the conditional block. If the **EndIf** action is missing, the client displays a dangling error and the Test case fails.
  {% endhint %}

## Syntax

**Input Value**: `N/A`&#x20;

| Argument | Description    |
| -------- | -------------- |
| N/A      | Not Applicable |

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

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

### **Example: Executing Alternative Steps When the If Condition Fails**

In this example, we explain how the Else action runs when the condition defined in the previous If action is false.

* **Action**: Else
* **Input Value**: N/A
  * This action does not require any input value. It defines an alternate set of actions that execute only when the If condition fails.
* **Output Value**: {Status}
  * The execution status of this action is stored in the **{Status}** dynamic variable, with the following possible values:
    * **True**: If the Else part executes successfully.
    * **False**: If the Else part does not execute because the If condition is fulfilled.
* **Logical Explanation**: The **Else** action triggers only when the condition defined in the corresponding **If** action evaluates to false (for example, when the person is not eligible for a loan). When this condition is false, the execution flow enters the Else part and performs the steps defined within it. In this example, the **Display Variable Value** action displays the value of the **{Not Eligible}** variable (Not Eligible for Loan). The execution then continues until the **EndIf** action is reached. Finally, the execution status (True) is stored in the **{Status}** variable.

<figure><img src="/files/5iUTChtKuAwYIv5SxqfE" 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/generic/loops-and-condition-operations-1/else.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.
