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-numberfor currency, phone numbers, and other numeric outputformat-datefor Salesforce date and datetime fieldsprefix/postfixfor labels and unitssubstitutefor exact value swapsreplaceallfor partial text swapsrenderfor 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:
RED→BLUERED FIRETRUCK→RED FIRETRUCK
replaceall
Replaces only the matching part of a value.
Use it when the field contains longer text.
Examples:
RED→BLUERED FIRETRUCK→BLUE FIRETRUCKPINK FIRETRUCK→PINK FIRETRUCK
breakeverynchars
Forces long strings to break more cleanly.
This helps with URLs, IDs, and other long text that stretches a table.
Example:
Opportunity Name→Op 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:
5→5 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:
1234567891234→12,345,678,912.341234567891234→12.345.678.912,341234567891234withprefix="$"→$-12,345,678,912.341234567891→123-456-78911234567891→(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/2026January 03, 2026Sat Jan 3, 20261/3/2026 12:00Jan 3, 2026 12:00:00January 03, 2026 11:00 CST03 January, 26 12:00 PM
type
Controls how S-Docs renders the field value.
Common options:
type="rtf"keeps rich text formattingtype="text"strips HTML tagstype="checkbox"shows checkbox images for true/false style valuestype="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+Steve→Scuba 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.
showcolumn removes the body column only. If you have a table header, remove that header separately.
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.FieldNameto reference fields from the current rowInclude any referenced fields in the SOQL query
Leave the body of the
<column></column>tag empty when usingrenderEscape tag brackets inside the output with
lt#andgt#
render is supported in direct SOQL related lists. Use it inside blocks with <soql>...</soql>.
Example: several attributes together
Choosing the right attribute
Use:
substitutefor exact matchesreplaceallfor partial matchesprefix/postfixfor simple labelsformat-numberandformat-datefor display formattingshowcolumnto hide whole columnsrenderwhen the output depends on row-level logic
Last updated
Was this helpful?

