For the complete documentation index, see llms.txt. This page is also available as Markdown.

Related List Attributes

Use these attributes inside <column> tags to control how related list values display.

They are most useful when you want to:

  • clean up labels

  • format dates or numbers

  • add fallback text

  • hide columns conditionally

  • build more readable output for end users

These examples also work when a named query runs before the related list.

Quick picks

Start with these first:

  • format-number for currency, phone numbers, and other numeric output

  • format-date for Salesforce date and datetime fields

  • prefix / postfix for labels and units

  • substitute for exact value swaps

  • replaceall for partial text swaps

  • render for advanced conditional output

Replace or clean text

substitute

Replaces the entire value when it matches exactly.

Use it when the stored value is correct, but not user-friendly.

Examples:

  • REDBLUE

  • RED FIRETRUCKRED FIRETRUCK

replaceall

Replaces only the matching part of a value.

Use it when the field contains longer text.

Examples:

  • REDBLUE

  • RED FIRETRUCKBLUE FIRETRUCK

  • PINK FIRETRUCKPINK FIRETRUCK

breakeverynchars

Forces long strings to break more cleanly.

This helps with URLs, IDs, and other long text that stretches a table.

Example:

  • Opportunity NameOp po rt un it y Na me

Add text before or after values

prefix

Adds text before a value.

It only appears when the field has a value.

Example:

  • 1250$1250

postfix

Adds text after a value.

It only appears when the field has a value.

Example:

  • 55 units

Null and "always show" variants

nullprefix

Adds text before the output only when the field is null.

nullpostfix

Adds text after the output only when the field is null.

allprefix

Adds text whether the field has a value or is null.

This saves you from combining prefix and nullprefix.

allpostfix

Adds text whether the field has a value or is null.

This saves you from combining postfix and nullpostfix.

Format output

format-number

Formats numeric values using a pattern.

Use it for currency, separators, decimals, or phone-style output.

Examples:

  • 123456789123412,345,678,912.34

  • 123456789123412.345.678.912,34

  • 1234567891234 with prefix="$"$-12,345,678,912.34

  • 1234567891123-456-7891

  • 1234567891(123) 456-7891

format-date

Formats Salesforce date and datetime fields with a Java date pattern.

If the input is January 3, 2026 12:00 PM EST, the output can be:

  • 1/3/2026

  • January 03, 2026

  • Sat Jan 3, 2026

  • 1/3/2026 12:00

  • Jan 3, 2026 12:00:00

  • January 03, 2026 11:00 CST

  • 03 January, 26 12:00 PM

type

Controls how S-Docs renders the field value.

Common options:

  • type="rtf" keeps rich text formatting

  • type="text" strips HTML tags

  • type="checkbox" shows checkbox images for true/false style values

  • type="radio" shows radio button images for yes/no style values

Combine values from two columns

mergenext

Merges the current cell with the cell to its right.

This is useful for first name + last name, city + state, or label + value pairs.

Example:

  • Scuba + SteveScuba Steve

Show or hide output conditionally

showcolumn

Shows or hides a column based on a condition.

Use this when the same template should show different columns for different records.

render

Outputs different text based on other values from the same row.

This is the most flexible attribute on this page.

You can also return formatted rich text:

Rules:

  • Use RECORD.FieldName to reference fields from the current row

  • Include any referenced fields in the SOQL query

  • Leave the body of the <column></column> tag empty when using render

  • Escape tag brackets inside the output with lt# and gt#

render is supported in direct SOQL related lists. Use it inside blocks with <soql>...</soql>.

Example: several attributes together

Choosing the right attribute

Use:

  • substitute for exact matches

  • replaceall for partial matches

  • prefix / postfix for simple labels

  • format-number and format-date for display formatting

  • showcolumn to hide whole columns

  • render when the output depends on row-level logic

Last updated

Was this helpful?