# Close Sub Window

This is a pre-built action located under the **@Window Element**. The functionality of this action in Avo Assure is to close a sub-window of the application without affecting the main application window.

### Syntax

**Input Value:** `<Sub-window name>;<index>(Optional)`

| Argument                                | Description                                                              |
| --------------------------------------- | ------------------------------------------------------------------------ |
| <p>\<Sub-window name><br>(Required)</p> | Specify the title of the sub-window to be closed.                        |
| <p>\<index><br>(Optional)</p>           | The index of the sub-window, if multiple instances with same name exist. |

**Output Value**

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

**Example** **1**

**Closes a specified sub-window within the application based on its name**

The **Close Sub Window** action takes the value from the Input Value column (e.g., **Avo Bank**) and closes the sub-window using the provided name.

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

**Example 2**

**Closes a specified sub-window within the application based on its name and index**

The **Close Sub Window** action takes the value from the Input Value column (e.g., **Avo Bank;1**) and closes the sub-window using the provided name and optional index.&#x20;

<figure><img src="/files/80eUHBBHrMzXnghirvtk" 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/window/close-sub-window.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.
