> For the complete documentation index, see [llms.txt](https://easycatalog.nousmedis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easycatalog.nousmedis.com/setting-up-your-data/field-options/available-field-options/the-format-pane/formatting-rule.md).

# Formatting rule

The **Formatting Rule** format type is designed to dynamically generate content based on a predefined *Formatting Rule*.

When the field is inserted is inserted into a layout:

* The system retrieves the named *Formatting Rule* and applies its logic to the field’s content.
* The resulting formatted output is placed between text markers in the document, without any tags (tags within tags are not allowed).

<figure><img src="https://1939597359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FazTsFGbHKYYVlYs8LIQv%2Fuploads%2F58U7XK4UbBcoVqgpGatr%2Ffield%20options%20formatting%20rule.png?alt=media&amp;token=48d40040-ca5a-4e20-93a1-01d49c332e96" alt=""><figcaption></figcaption></figure>

### Name

Type or select the name of the existing formatting rule you want to insert.

### Repeat For Each Line

When enabled, the rule is applied separately to each line of the field's content. For the duration of each run, the field contains only the text of that single line, so conditions and formatting are evaluated line by line rather than on the whole field. When the rule finishes, the field returns to its full content.

### Fields

Lists the fields used by the selected **Formatting Rule**. EasyCatalog uses this list to decide when the rule needs to be re-applied: whenever the value of any of these fields changes, the Formatting Rule is updated between the field markers.

### Preview

Shows how the formatting rule will look when it is inserted.

{% hint style="info" %}
You can include complex logic or layout information inside what looks like a regular field. If you choose a `Function` formatting rule type, the **Fields** list helps EasyCatalog decide which formatting rule to insert.
{% endhint %}


---

# 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://easycatalog.nousmedis.com/setting-up-your-data/field-options/available-field-options/the-format-pane/formatting-rule.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.
