List of functions available for merge fields in Office File Creator.
Common
Merge Fields Format: {!Function()}
Function | Description | Merge Field | OFC Version |
Today | Output today's date. | {!Today()} | Ver.2 |
Now | Output the current date and time. | {!Now()} | Ver.2 |
Pagenumber | Output page numbers of PDF. | {!pagenumber()} | All Version |
Pagecount | Output the total number of pages of PDF. | {!pagecount()} | All Version |
Lt | Output the symbol "<". | {!Lt()} | Ver.2 |
Gt | Output the symbol ">". | {!Gt()} | Ver.2 |
*Lt/Gt Function
When outputting Word/PowerPoint/PDF, if the template contains the symbol "<" or ">", the text may be misaligned and the layout may not be output correctly. If misalignment occurs, use the Lt and Gt functions for the template.
Functions for child record
Merge Fields Format: {!Childrelationship Name.Number()}
Function | Description | Example of Merge Field | OFC Version |
Number | Output sequential numbers in the child record output line. | {!Number()}
{!OpportunityLineItems.Number()} |
All Version |
Blank | Output blanks. Used to adjust block rows in child records. | {!OpportunityLineItems.blank()} | Ver.2 |
Aggregate Functions
Merge Fields Format: {!Childrelationship Name.Function(Field API Name)}
Function | Description | Merge Field | OFC Version |
Sum | Returns the total sum of a numeric field. | {!OpportunityLineItems.Sum(TotalPrice)} | Ver.2 |
Count | Returns the number of group rows. | {!OpportunityLineItems.Count(Id)} | Ver.2 |
Avg | Returns the minimum value of a field. | {!OpportunityLineItems.Avg(TotalPrice)} | Ver.2 |
Min | Returns the minimum value of a field. | {!OpportunityLineItems.Min(TotalPrice)} | Ver.2 |
Max | Returns the maximum value of a field. | {!OpportunityLineItems.Max(TotalPrice)} | Ver.2 |
Memo
- If the group field is a formula field, the aggregate function cannot be used.
- Output the aggregate value of child records. Aggregate functions can only be used for child objects for which grouping has been set in the OFC_Child Object Option record.