# Condition

Condition elements show users different views based on defined conditions.

To switch views, click on the dropdown on the top right.

To set the content for a view, click on a tab to build the view page.

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

## Properties

<img src="/files/B5Frkje8I8SQ3XTCR2Ki" alt="" data-size="original">

**Conditional View List:** Each view has a pair of input boxes.

1. Enter the view name into the first input box.&#x20;
2. Enter the condition into the second input box.

Add additional views with “+ Add an item”.

See [Tooltip](/app-builder/app-construction/elements/tooltip.md) for tooltip configurations.

## Example

In this example, there are two views, ‘Display Details’ and ‘No Data’.

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

When the value of app data variable `display_details` is  `“false”`, the condition element displays the ‘No Data’ view. When it is `"true"`, the condition element will display the ‘Display Details’ view.

See [Data Store](/app-builder/app-construction/data-store.md) for more about accessing app data.

## Supported Events

No supported events.

## Supported Actions

**Set Data:** Change element data. See [Data Store](/app-builder/app-construction/data-store.md).

**Set Loading:** Set loading animation. See [Set loading animations](/app-builder/popular-use-cases/set-loading-animations.md).

{% hint style="info" %}
Visit [Interactions](/app-builder/app-construction/interactions.md) for more on events and actions.
{% endhint %}


---

# 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.acho.io/app-builder/app-construction/elements/advanced-elements/condition.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.
