# Button

You can use the button variable to trigger a set of actions such as setting the layout, ranking the data, or displaying data for a specific period.

### 1. Configuration <a href="#id-1.-configuration" id="id-1.-configuration"></a>

This section outlines configurations specific to button variables.

**1.1. Button icon:** Select an icon to display in the button.

<figure><img src="/files/VvoNukn0rWDMkfAj5KBp" alt=""><figcaption><p>Button icon</p></figcaption></figure>

**1.2. Enable toggle scripts:** You can specify a set of actions to be applied when the button is enabled(Enabled Script) and another set of actions when the button is disabled(Disabled Script). The label on the button also changes based on the state of the button. The **Enabled Button Label,** **Disabled Button Label**, **Enabled Script**, and **Disabled Script** options will be available only when the **Enable toggle scripts** option is turned on.

<figure><img src="/files/vxlD20GSXCyDHgK6xxRA" alt=""><figcaption><p>Enable toggle scripts</p></figcaption></figure>

* Background colors: Customize the button background and font colors in both enabled and disabled states.

{% hint style="info" %}
This option is currently available only in Reporting Matrix
{% endhint %}

<div><figure><img src="/files/cFBXPbgXGMIICTAgzsAo" alt=""><figcaption><p>Setting background colors in enabled and disabled states</p></figcaption></figure> <figure><img src="/files/5qD6tTaT8eltf7SWbDSx" alt=""><figcaption><p>Button color is blue in enabled state</p></figcaption></figure></div>

**1.3. Button label:** The text that is displayed on the button.

**1.4. Execute script:** You can use scripting functions to rank data, set conditional formatting, apply semantic formatting, handle nulls and zeroes, etc. [Learn more about scripting functions in Inforiver](/formula-syntax/scripting-functions.md).

<figure><img src="/files/jusl6aGkXQoW51wupu1L" alt=""><figcaption><p>Button variables</p></figcaption></figure>

You can maximize the formula editor when defining the button variable by clicking the expand icon near Execute Script.

<figure><img src="/files/UX30vlxk0Xlo0NCVbbWY" alt=""><figcaption><p>Formula Editor is maximized in the Define variable.</p></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.inforiver.com/working-with-inforiver/18.-variables/variable-types/button.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.
