# Boolean

The **boolean** widget allows you to display a status based on whether the measured value is **true** or **false**. If the measured value is **greater than zero** (value > 0), the status is considered **true** otherwise it is **false**. The boolean widget is suitable for displaying statuses like alarm, water leak, tamper, door open, etc.

In the **Widget options** modal, configure the following settings:

In the **Name** text box, enter a **name** as the **label** for your widget.

In the **Data field** drop-down list, select the **data field** to be used as the **data source**.

In the **Positive text** text box, enter a **text** to display if the measured value is **positive**.

In the **Negative text** text box, enter a **text** to display if the measured value is **negative**.

To add a **color** to the **background** of the widget, click on the **Background color** box and choose a **color** from the **color picker**.

Click on the **Save** button.

<figure><img src="/files/NvtsewGSSo1AeEdZGD8a" alt="" width="328"><figcaption></figcaption></figure>

The resulting **boolean** widget looks something like this:

<figure><img src="/files/rsBpNpKt1JSFICLuxgYn" alt="" width="275"><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.widgelix.com/get-started/widgets/boolean.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.
