> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/add-status-indicators.md).

# Add Status Indicators

A small colored dot beside each deal's stage, made from a badge with its text hidden, keeps the status visible in a narrow table on an Account page.

On an Account page, a rep looks at a narrow list of the account's open deals. A full badge per row takes too much room, yet the rep still wants to spot the deal that is about to close. A small colored dot next to the Stage column uses the same colors as a badge in a fraction of the width.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FoRBq2YguKqmwaeYmb3UZ%2Fdata-table-tutorial-add-status-indicators-result.png?alt=media" alt="Narrow table where each row starts with a small colored dot followed by the stage name." width="560"><figcaption><p>A colored dot before each stage name, from a badge with its text hidden.</p></figcaption></figure>

## Before you start

* A [Data Table](https://docs.avonnicomponents.com/dynamic-components/components/data-table.md) on Opportunity with a [Query](https://docs.avonnicomponents.com/dynamic-components/component-builder/data-sources/query.md) data source, showing at least the **Opportunity Name** and **Stage** columns.
* The `Stage Color` text formula field on Opportunity. If you followed [Apply Badge Color-Coding](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/apply-badge-color-coding.md), you already have it.

## Steps

{% stepper %}
{% step %}

### Create the Stage Color formula field

Create the `Stage Color` text formula field as described in step 1 of [Apply Badge Color-Coding](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/apply-badge-color-coding.md). Keep its last line, the default color: without it, a stage missing from the `CASE` gets no dot.
{% endstep %}

{% step %}

### Add a column for the dot

1. Select the Data Table on the canvas.
2. In the Properties panel, open the **Data Mappings** section and click **Add Columns** under **Columns**.
3. Set **Source Field** to `Stage Color`.
4. Turn on **Custom Label** and leave **Label** empty, so the column has no header text.
5. Set **Type** to **Badge**.
   {% endstep %}

{% step %}

### Turn the badge into a dot

1. Under **Type Attributes**, turn on **Hide Text**. The badge becomes a colored circle.
2. On **Background Color**, turn on the **Field Name** toggle at the top right of the property and select `Stage Color`.
   {% endstep %}

{% step %}

### Size the column and place it

1. Open **Advanced Options** in the column settings and set **Fixed Width** to `50`.
2. In the **Columns** list, drag the new column just above the Stage column, so the dot sits right before the stage name.
   {% endstep %}

{% step %}

### Save and test

Save the component and open the page that holds it. Each row starts with a dot: gray for a Prospecting deal, orange for Negotiation/Review, green for Closed Won. The stage name stays readable in the next column.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
A dot has no text and no tooltip. Keep the Stage column visible next to it, so the status does not rest on color alone for users who cannot tell the colors apart.
{% endhint %}

## Use the built-in variants instead

To use the standard Lightning colors, leave **Background Color** empty and bind **Variant** to a `Stage Variant` field instead. The values and the formula are in [Apply Badge Color-Coding](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/apply-badge-color-coding.md). **Hide Text** works the same with a variant.

## Troubleshooting

<details>

<summary>Some rows have no dot</summary>

The badge shows nothing when its value is empty. Check that the formula ends with a default color, as in step 1.

</details>

<details>

<summary>The column header reads "Stage Color"</summary>

**Custom Label** is off. Turn it on and leave **Label** empty.

</details>

## Related tutorials

* [Apply Badge Color-Coding](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/apply-badge-color-coding.md): the same colors as a full badge, when the column has room for it.
* [Apply Conditional Cell Styling](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/apply-conditional-cell-styling.md): tint the whole cell instead of adding a column.
* [Manage Column Visibility](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/manage-column-visibility.md): choose which columns a narrow table keeps.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/dynamic-components/tutorials/components/data-table/add-status-indicators.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
