Tables, conditions, images and barcodes
Repeating tables
Section titled “Repeating tables”Use a repeating table for line items, contacts, or any list of child records.
- Put your cursor where the table should go.
- On the Build tab, open Related lists (repeating tables) and click the relationship you want, for example Contacts or Products (Line Items). + Table in the bottom bar takes you to the same section.
- Tick the child fields you want as columns.
- Click Insert table in the bar at the bottom of the pane. Cancel is beside it, and the ‹ chevron at the top left goes back without inserting anything.
The add-in inserts a two-row table: a header row with your column labels, and a data row that repeats once per child record when the document is generated. Three contacts produce three rows.
You can restyle the table (borders, shading, widths) like any Word table. Just do not delete the merge fields in the data row.
Filter and sort. The optional filter section limits which records appear, for example {{#Opportunities WHERE Opportunities.Amount > 10000}}, and sorts them (ORDER BY CloseDate DESC). Pick a field, operator and value, plus a sort field and direction. To change a list’s filter later, click its {{#…}} tag in the document and use the Edit card.
Nested lists
Section titled “Nested lists”The same panel can insert a list inside a list, one level deep: each opportunity, then each of its line items. Under Nested related list, pick the child’s own related list, tick the fields for each level, and click Insert nested list. That button stays inside its section rather than moving to the bottom bar, because it inserts a different shape from Insert table.
Each parent gets a heading line followed by a real table of its child records, the classic grouped-invoice layout. The outer {{#…}} and {{/…}} tags sit on their own paragraphs around the table. Keep them there.
Do not hand-type a nested list inside a table cell. A
{{#…}}…{{/…}}pair placed in one cell of a row that already repeats would duplicate the whole row and blank its other fields, so Save rejects that shape with a message explaining the fix. Put the outer repeat on paragraphs around the table instead, which is the shape the panel inserts.
Totals
Section titled “Totals”Insert total, in its own section of the same panel, adds a SUM, COUNT, AVG, MIN or MAX over a related list, for example {{SUM:OpportunityLineItems.TotalPrice:currency}} or {{COUNT:Contacts}}. Place a total outside the table.
Approval history
Section titled “Approval history”Every object’s related lists include Approval History, a repeating table over the record’s approval steps (actor, step status, comments, dates). It works like any other related list, except that totals are not available for it.
Conditions (if / else)
Section titled “Conditions (if / else)”- Optionally select the text you want to make conditional.
- Click + Condition.
- Choose a field, an operator (=, ≠, >, <, ≥, ≤, or contains for “this text appears anywhere in the field”), and a value.
- Tick NOT to invert the test, and Include an otherwise (else) branch if you want alternative text when the condition is false. A second clause can be joined with AND or OR.
- Click Insert in the bottom bar.
For example, a condition on Annual Revenue > 50000 wraps your selected text so it only appears for high-revenue accounts. With an else branch, you get “Premium tier” when it is true and “Standard tier” when it is false.
Show only when blank
Section titled “Show only when blank”Click More ▾ and then + If blank, and pick a field. The content between the tags appears only when that field is empty, which is handy for “No notes on file” style fallbacks.
Images
Section titled “Images”+ Image (under More ▾) inserts an image from a field that holds a Salesforce File, with an optional size, for example {{%Account.Logo__c:200x60}}. The picture is embedded into the document at generation time.
Barcodes and QR codes
Section titled “Barcodes and QR codes”Click + Barcode, pick the field whose value is encoded (an invoice number, a URL), choose Code 128 or QR, optionally set a size, and click Insert (or Update, on a barcode tag that is already in the document). The barcode image is generated into the document at merge time: {{*Account.AccountNumber}}, {{*Account.Website:qr:150}}. See Barcodes and QR codes for how they render.