# Logout

### The Goal

The task is quite simple. Make a one-button application cause Logout.

![The Logout button application](/files/DhmI0YdylOSQ6HLqfeAE)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] View\[Logout]
  * [ ] Container\[cntLogout]
    * [ ] Button\[btnLogout]
      {% endtab %}

{% tab title="View\[Logout]" %}
![](/files/7kNbYsVSDKNmI4Ar4fYN)
{% endtab %}
{% endtabs %}

### 1. Creat and Application

Binding a **Button** component with a specifically *Named route* will force an application to Logout. Let's try to make it.

1. Create a new **View** and name it `Logout`.
2. Put into a **Container**, called it `cntLogout` and set up its *Item Flex* -> `Stretch`; *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`
3. Place in a **Button**, name its *ID* -> `btnLogout` and set up as follows:
   1. *Value* -> "`Logout`"; *Width* -> `100px`
   2. *Button Type* -> `Link`; -> *Link Type* -> `Named Route`; -> *Named Route (select)* -> `logout`

That's all and we are done! Your application will log out after clicking on the button. This functionality is available after deployment and running an application.

{% tabs %}
{% tab title="btnLogout\[Type]" %}
![](/files/Xs2AORFdzrrRcZbP9WJX)
{% endtab %}
{% endtabs %}


---

# 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.adapptio.com/working-with-adapptio/how-to/ui-logic/logout.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.
