> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/premium-table/working-with-premium-table/10.-variables/variable-types/button.md).

# 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>

**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](/premium-table/formula-syntax/scripting-functions.md).

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

### 2. Examples <a href="#id-2.-examples" id="id-2.-examples"></a>

**2.1. Executing scripts**

**STEP 1:** Create a button variable with the configuration shown.

<figure><img src="/files/BGzrkUgKWJwGMTjcZFwx" alt=""><figcaption><p>Create button</p></figcaption></figure>

**STEP 2:** Click the button from the variables side pane to execute the underlying scripts.

<figure><img src="/files/asyT0uS5AkKKjqnJEl9q" alt=""><figcaption><p>Using button variables</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.inforiver.com/premium-table/working-with-premium-table/10.-variables/variable-types/button.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
