> 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/template-attributes-how-to-guides.md).

# Template Attributes (How-to Guides)

Use these guides when you need a quick fix for a specific template attribute task.

Each child page focuses on one problem and includes practical examples you can reuse.

### What are template attributes?

Template attributes are instructions added to S-Docs template syntax.

They change how data renders in the generated document.

They do not change the Salesforce record.

Common uses include:

* formatting dates, numbers, currency, text, and checkbox output
* replacing blanks or raw values with cleaner display text
* controlling related list columns, numbering, and layout

### How are they used in S-Docs?

Use template attributes while building the template body.

Add them directly to a merge field, related list column, or template tag.

S-Docs reads the attribute at render time and outputs the formatted result.

In practice, template builders use attributes to:

* format single fields such as amounts, dates, and names
* control repeating data in related lists and `lineitemsSOQL`
* manage document output details such as fallback text, row numbering, and page breaks

{% hint style="info" %}
Use template attributes when the data is already correct and you only need to change how it displays.
{% endhint %}

### Format field values

* [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 Format Date and Time Together](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-format-date-and-time-together.md)
* [How to Show Checkboxes on Forms](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-show-checkboxes-on-forms.md)
* [How to Convert Text to Uppercase or Lowercase](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-convert-text-to-uppercase-or-lowercase.md)
* [How to Create Multilingual Documents](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-create-multilingual-documents.md)
* [How to Replace Values with Different Text](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-replace-values-with-different-text.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 Display Salesforce Encrypted Fields](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-salesforce-encrypted-fields.md)
* [How to Display Long URLs or Text Without Breaking Layout](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-long-urls-or-text-without-breaking-layout.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)

### Control related list output

* [How to Conditionally Show/Hide Table Columns](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-conditionally-show-hide-table-columns.md)
* [How to Display Different Values Based on Conditions](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-display-different-values-based-on-conditions.md)
* [How to Format Line Items Without Tables](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-format-line-items-without-tables.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 Add Custom Headers and Footers to Tables](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-add-custom-headers-and-footers-to-tables.md)
* [How to Number Table Rows](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-number-table-rows.md)
* [How to Add Email Recipients from Related Lists](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-add-email-recipients-from-related-lists.md)

### Control document layout and specialized output

* [How to Generate Checks and Banking Documents](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-generate-checks-and-banking-documents.md)
* [How to Work with Right-to-Left Languages](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-work-with-right-to-left-languages.md)
* [How to Create Multi-Page Documents with Page Breaks](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-create-multi-page-documents-with-page-breaks.md)
* [How to Split Field Values into Individual Cells](/sdocs/advanced-template-logic/template-attributes/template-attributes-how-to-guides/how-to-split-field-values-into-individual-cells.md)

### Need the basics first?

* [Get Started with Template Attributes](broken://spaces/WKNnJmhJBQwhdk5WBFsi/pages/yiU0PM2kVQqfCOAk2or8)
* [Template Attribute Reference](broken://spaces/WKNnJmhJBQwhdk5WBFsi/pages/rQ6CaFFP1b3NS0dsh7h0)


---

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