> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/action-nodes/open-and-close-dialog.md).

# Open/close dialog

{% hint style="info" %}
Showroom: [Open dialog example](https://showroom.appfarm.app/action-nodes/open-dialog), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

## Open dialog

The **Open Dialog** action node opens a [dialog](https://docs.appfarm.io/reference/apps/ui/views/dialog.md) view in the app. It is available in apps.

| Property   | Description                                                                                                                               |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Dialog** | The dialog to open. Select a dialog view, or bind to a property that holds a view, for example from the built-in **View** enum. Required. |

If a temporary drawer is open, it closes when the dialog opens. A responsive drawer also closes on small screens.

If the selected view doesn't exist, nothing happens. If it is not a dialog view, the action node fails with the error *View is not a Dialog, and thus cannot be opened*.

## Close dialog

The **Close Dialog** action node closes a dialog.

| Property   | Description                                                                                                              |
| ---------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Dialog** | Leave empty to close the dialog in focus. The field then shows **Current Dialog**. Select a dialog to close that dialog. |

If the selected view doesn't exist, nothing happens. If it is not a dialog view, the action node fails with the error *View is not a Dialog, and thus cannot be closed*. To close a popover, use [Close Popover](https://docs.appfarm.io/library/action-nodes/open-and-close-popover.md).

## Example

A dialog **Edit customer** has a **Save** button. Its **On Click** action runs **Persist Objects** and then **Close Dialog** with **Dialog** left empty. Because the action runs from inside the dialog, the dialog in focus is the one that closes. The same action works if you later reuse it in another dialog.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/action-nodes/open-and-close-dialog.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
