Template example demonstrating variables and summaries with calculations & conditions.
This document template shows how you can calculate elements in table rows, summaries and use variables in your template
Sometimes you want to calculate some value based on data input and reuse it across the document.
Cost of labor: {labor} USD
Cost of parts: {parts} USD
Total Cost: {$ total = labor + parts } USD
Total Cost + Tax: {$ total * 1.22 } USD (Including 22% Tax)
Note: The above variables can be used in calculations and conditions throughout the document. Example:
{#$ total > 1000 }
Warning! Your total net cost exceeds 1000 USD
{/}
You can combine variables with a hide formatter. To create hidden calculated fields that you can use across your template.
Cost of labor: {labor} USD
Cost of parts: {parts} USD
{$ totalCost = (labor+parts) * 1.22 | hide}
Total Cost: {$ totalCost } USD
Total Cost + Tax: {$ totalCost * 1.22 } USD (Including 22% Tax)
Note: The above variables can be used in calculations and conditions throughout the document. Example:
{#$ total > 1000 }
Warning! Your total net cost exceeds 1000 USD
{/}
Below is an example of a table that summarizes items billed, including calculations for total amounts using Smart Fields.
Description | Quantity | Unit Price | Total |
---|---|---|---|
{#items}{description} | {quantity} | {unitPrice} | {$ quantity * unitPrice | format}{/items} |
This section provides a summary of the total amounts calculated for the items billed.
Subtotal: {$ subtotal = items | sum: "quantity*unitPrice"}
Tax (22%): {$ tax = subtotal * 0.22}
Total Due: {$ subtotal + tax | format}
This document template includes dynamic placeholders for automated document generation with Documentero.com. Word Template - Free download
Download Word Template (.DOCX)Download the Variables & Summaries template in .DOCX format. Customize it to suit your needs using your preferred editor (Word, Google Docs...).
Upload the template to Documentero - Document Generation Service, then map and configure template fields for your automated workflow.
Populate templates with your data and generate Word (DOCX) or PDF documents using data collected from shareable web Forms, APIs, or Integrations.
DocumentDOCX
DocumentDOCX
DocumentDOCX
DocumentDOCX