Skip to content Skip to main navigation Skip to footer

Checkbox that refers to multiple conditional merge sections within a template

Use Case: 
Custom object “Job” (labeled as AVTRRT in merge field code) has custom checkbox. If that box is checked under field “Engagement Fee”, then merge 3 different conditional merge sections onto my generated document.

Solution:
Make sure there is a clear start and end to each of the sections: [SECTION_START:XXX]} and [SECTION_END:XXX]}. You also want to make sure that each section has it’s own name . See below example with EngagementFee1, EngagementFee2, and EngagementFee3:

{!AVTRRT__Job__c.Engagement_Fee__c[SECTION_START:EngagementFee1]}
First Section
{!AVTRRT__Job__c.Engagement_Fee__c[SECTION_END:EngagementFee1]}
{!AVTRRT__Job__c.Engagement_Fee__c[SECTION_START:EngagementFee2]}
Second section
{!AVTRRT__Job__c.Engagement_Fee__c[SECTION_END:EngagementFee2]}
{!AVTRRT__Job__c.Engagement_Fee__c[SECTION_START:EngagementFee3]}
Third section
{!AVTRRT__Job__c.Engagement_Fee__c[SECTION_END:EngagementFee3]}