> For the complete documentation index, see [llms.txt](https://help.sdocs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sdocs.com/sdocs/advanced-template-logic/template-attributes.md).

# Format Data with Template Attributes

Learn how template attributes format values, related lists, and document layout in S-Docs. Start with the tutorial, jump to task guides, or use the reference for exact syntax.

Use this section when you need to control how S-Docs renders data in a template.

Template attributes format field values, related lists, and document layout at render time.

They help you control output without changing Salesforce data.

Use this section to start with the basics, jump to a specific task, or look up exact syntax.

{% hint style="info" %}
Template attributes change document output only. They do not update Salesforce field values.
{% endhint %}

### Start with the path that fits your goal

If you are new to template attributes, start with the tutorial.

If you already know the result you want, jump to the how-to guides.

If you need exact syntax, supported options, or deeper examples, use the reference page.

<table data-column-title-hidden data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-card-target data-type="content-ref">Target</th></tr></thead><tbody><tr><td><strong>Get Started with Template Attributes</strong></td><td>Build a simple template and learn the most common attribute patterns step by step.</td><td><a href="/quick-start/template-building/how-to-format-text-dates-and-currency.md">How to Format Text, Dates, and Currency</a></td></tr><tr><td><strong>Template Attributes (How-to Guides)</strong></td><td>Jump to task-based guides for formatting values, controlling layout, and customizing related lists.</td><td><a href="/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides.md">Template Attributes (How-to Guides)</a></td></tr><tr><td><strong>Template Attribute Reference</strong></td><td>Use the reference page when you need exact attribute syntax and supported options.</td><td><a href="/developer-hub/template-configuration-and-styling/template-attributes-complete-reference.md">Template Attribute Reference</a></td></tr></tbody></table>

### What you can do with template attributes

* format currency, dates, datetime values, text, and checkbox output
* replace raw field values with labels, substitutions, translations, or fallback text
* control related list columns, row output, numbering, and custom table layouts
* manage page breaks, rich text behavior, and fixed-width field splitting
* support encrypted fields, banking formats, and right-to-left output

### Browse by topic

* [Template Attributes (How-to Guides)](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides.md)
* [How to Format Currency Values](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-format-currency-values.md)
* [How to Display Dates in Different Formats](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-dates-in-different-formats.md)
* [How to Handle Null or Empty Values](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-handle-null-or-empty-values.md)
* [How to Create Custom Table Layouts](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-create-custom-table-layouts.md)
* [How to Work with Rich Text Fields](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-work-with-rich-text-fields.md)

### Related note

Use [Insert Data Tables](/sdocs/advanced-template-logic/related-lists.md) when you need to control which rows a repeating table returns.

Use template attributes when the query already returns the right data and you only need to change how that data displays.


---

# 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://help.sdocs.com/sdocs/advanced-template-logic/template-attributes.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.
