Repeating sections

On the PDF Template page, each section has a Repeat field with associated Sort By and Condition fields:

Screenshot: Repeat, Sort by, and Condition fields for a PDF template section

These fields control section repetition in a document based on the PDF Template.

Complete the fields as follows:

Field

Description

Repeat

The API Name of the object containing the values you want to display in the repeating section. The object holding the values you want must be accessible from the object from which you send the PDF.

For example, when sending a PDF from a Team Member record:

  • To repeat a section once for each Objective for the Team Member, enter:

    fHCM2__Objective__r

    Use the r to indicate a related object.

  • To repeat a section once for each skill held by the Team Member, enter:

    fHCM2__Skill__r

    Use the r to indicate a related object.

Sort By

The API Name of the field on the object entered in Repeat you want to use to sort the sections.

For example to sort Objectives by Start Date, enter:

fHCM2__Start_Date__c

Condition

The condition that controls when the section is repeated. The section repeats as long as the Condition is met.

For example, to repeat a section for each active Objective, excluding objectives with any other status, enter:

fHCM2__Status__c='Active'

In the content of the section enter any text and Merge Fields you want to include.

For example, if you are using repeated sections to list active objectives, your repeating section could include:

Copy
Your objective: {!Name} with start date: {!fHCM2__Start_Date__c} is currently 
{!fHCM2__Status__c} and has a progress rating of {!fHCM2__Progress__c}.

When combined with Layout set to New Line, this generates a PDF with content as follows:

Annotated image: How four merge fields in a repeating section produce PDF content with associated text