Service Flow Manager > Output Documents > Output Document for Admin > How to Manage Document Templates > Merge Fields - Field Labels, Field Values, and Functions
Merge Fields - Field Labels, Field Values, and Functions
1. In the Content Tree, expand the target header / child tree item and click the field you need.
2. Copy the 'Field Label' value and paste it in the HTML Editor content area. It is of the form {{$M.<Alias Name>.<Field Name>.label}}. For example, it is {{$M.Service_Quote.Name.label}}: for Quote Number field in Service Quote object.
* 
To display the label of any field(s) of an object, the value of at least one field from the corresponding object must be included in the template.
3. Copy the 'Field Value' value and paste it in the HTML Editor content area.
It is of the form {{$D.&lt;Alias Name .&lt;Field Name }}. For example, it is {{$D.Service_Quote.Name}} for Quote Number field in Service Quote object.
For lookup fields, expand the tree further, click the Name field (for example Account Name for Account lookup field), and use this Field Value ({{$D.Service_Quote.SVMXC__Company__c.Name}}). This is to display the Name field value instead of the Salesforce Id.
You can also select any other field in the lookup object (for example, Product Code for Product lookup field), to display a value other than Name field value.
* 
You can use the Quick Find box to search for fields and functions.
4. In the Content Tree, expand the Functions tree, and expand the required tree item, and click the function name (for example, Date function TODAY).
5. Copy the 'Field Value' value ({{$F.TODAY()}}) and paste it in the HTML Editor content area.
For Rich Text Area fields which can have HTML content, directly pasting the Field Value will not render the content with proper format. So, use attribute-driven data binding for such fields after switching to HTML Source mode.
It is of the form <div svmx-data="{{$D.<Alias Name>.<Field Name>}}"/>
For example, if there is a rich text area field with the API Name Rich_Text_Area__c in Service Quote object, the Field Value has to be specified as follows:
<div svmx-data="{{$D.Service_Quote.Rich_Text_Area__c}}"/>
For child object fields, directly pasting Field Value will not render the content. Details about handling child object field values is covered in the section Child Sections.
Was this helpful?