# 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="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FuYo1n8CTMU2hM0bKAasm%2Fimage.png?alt=media&#x26;token=6ee7bb65-8a99-46bd-b261-f4557b34531f" 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="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fzkt2Xf9gBv5r6sKa5o52%2Fimage.png?alt=media&#x26;token=a2c95072-05ca-4ebf-a986-fb530d11558e" 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="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FwBzHv3S5HSuCpWJgJdrs%2Fimage.png?alt=media&#x26;token=d1d307df-2e31-455f-aacd-4e00fb82b7bc" alt=""><figcaption><p>Setting background colors in enabled and disabled states</p></figcaption></figure> <figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FxKKucgnFOmXOxb8XqHnz%2F2025-07-24_05h59_54.png?alt=media&#x26;token=3bda8309-d139-49e4-8f26-cba2eb0120c0" 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](https://docs.inforiver.com/formula-syntax/scripting-functions).

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F1jpbtT3ejA7KzG5sM7wq%2Fimage.png?alt=media&#x26;token=ba60c969-5889-4875-8acd-85d0b4f4557a" 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="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FxyBeybLUfnP6nCoNcmxP%2Fimage.png?alt=media&#x26;token=a73d8afb-33d0-440f-be21-73cccb12a49e" alt=""><figcaption><p>Formula Editor is maximized in the Define variable.</p></figcaption></figure>
