> For the complete documentation index, see [llms.txt](https://docs.ninox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninox.com/builder-hub/visualize-and-organize-your-data/style-your-tables-with-conditional-formatting.md).

# Style your tables with conditional formatting

Use conditional formatting to make table views and table elements on a record form easier to scan with colors and icons based on conditions.

## Set up the conditions and styling

{% stepper %}
{% step %}

#### Choose the table

* Go to the table view you want to format.
* Click one of the column headers.
* Choose **Conditional formatting**.
  {% endstep %}

{% step %}

#### Set up a rule

* Set the condition by choosing a column, an operator, and a comparison value.
* Choose whether to format the **Cell** or the whole **Row**.
* Set the text style, colors, or icon in **Value**.\
  Available highlighting options are:
  * **Row**
    * Text styles: **Bold**, **Italic**, **Strikethrough**
    * **Text color**, **Background color**
  * **Cell**
    * Text styles: **Bold**, **Italic**, **Strikethrough**
    * **Text color**, **Background color**, **Text highlight color**
    * **Recently used icons**
* Click <i class="fa-circle-plus">:circle-plus:</i> **More colors** or <i class="fa-circle-plus">:circle-plus:</i> **Select icon** to chose from more color options or icons.

<figure><img src="/files/1CEa2u5Agz5YI9pTjPkw" alt=""><figcaption></figcaption></figure>

* Click **Apply** to confirm your choices or **+ Add rule** to add more rules if needed.
  {% endstep %}

{% step %}

#### Arrange the rule order

In some cases, more than one rule applies to the same **Cell** or **Row**. Because only one format can be shown at a time, arrange the rules according to their [ranking](#ranking-order-of-rules).\
Use the **`⋮⋮`** handle on the left to drag a rule up or down.
{% endstep %}
{% endstepper %}

### Ranking order of rules

Rules need a ranking because more than one rule can apply to the same **Cell** or **Row**.

When multiple rules apply:

* The first matching rule wins for each formatting option.
* If a rule does not set a formatting option, Ninox uses the next applicable rule for that option.
* A matching **Cell** rule overrides a matching **Row** rule, even if the **Row** rule appears first.

{% hint style="info" %}
Rule ranking is applied to each formatting option separately. For example, if a higher-ranked rule sets only the background color, Ninox can still take **Italic** from a lower-ranked applicable rule.
{% endhint %}

Let's take a look at an example:

Set two rules that target the same records. In the first rule, set a background color and a text color. In the second rule, set a different background color.

<figure><img src="/files/fErMYya0LmzNVvqBJ4Ld" alt=""><figcaption></figcaption></figure>

The second rule does not apply because the first rule already set the background color.

<figure><img src="/files/s6U5qE0tq3QYtfqiJeMm" alt=""><figcaption></figcaption></figure>

Now change the order of the two rules. In the new first rule, set *`I`* **Italic**.\
Then add a third rule for a cell. In that rule, set **Bold**, **Text color**, **Background color**, **Text highlight color**, and an **Icon**.

<figure><img src="/files/rZKFWSG3Zb3JDkLBa0cj" alt=""><figcaption></figcaption></figure>

The final result is built in layers:

* Rule 1 sets the background color and italic text style for matching rows.
* Rule 2 sets the text color for those rows.
* Rule 3 sets the background color, text color, and icon for the matching cell.

<figure><img src="/files/z8ctBs5mfwxOvlr2MKLB" alt=""><figcaption></figcaption></figure>

This example shows how Ninox evaluates each formatting option separately. A row can take its background color from one rule, its text color from another, and a cell-specific style or icon from a third rule.


---

# 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.ninox.com/builder-hub/visualize-and-organize-your-data/style-your-tables-with-conditional-formatting.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.
