# Format Data with Template Attributes

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="/spaces/v7v0UNK83URKB2C83QVU/pages/1DaS2rmYNuRZtvQ2kSXQ">/spaces/v7v0UNK83URKB2C83QVU/pages/1DaS2rmYNuRZtvQ2kSXQ</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="/spaces/WKNnJmhJBQwhdk5WBFsi/pages/BHldjkpEA1gDUNJMPhfX">/spaces/WKNnJmhJBQwhdk5WBFsi/pages/BHldjkpEA1gDUNJMPhfX</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="/spaces/qNhwNwsut3uqS2daHMHX/pages/4bmJYocfrc0KbWraRj6o">/spaces/qNhwNwsut3uqS2daHMHX/pages/4bmJYocfrc0KbWraRj6o</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: 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:

```
GET https://help.sdocs.com/sdocs/advanced-template-logic/template-attributes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
