V

Variables & Summaries Document Template

Template example demonstrating variables and summaries with calculations & conditions.

Variables & Summaries

This document template shows how you can calculate elements in table rows, summaries and use variables in your template

Variables

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

{/}

Hidden Variables

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

{/}

Table with Dynamic Column

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}

Table summary

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)
Template Icon

Customize Template

Download the Variables & Summaries template in .DOCX format. Customize it to suit your needs using your preferred editor (Word, Google Docs...).

Configure Icon

Upload & Configure

Upload the template to Documentero - Document Generation Service, then map and configure template fields for your automated workflow.

Create Icon

Generate Documents

Populate templates with your data and generate Word (DOCX) or PDF documents using data collected from shareable web Forms, APIs, or Integrations.

Other templates in General Examples

Table & List

DocumentDOCX

Template example with table rows binding and bullet point list example.
Template example demonstrating smart fields and sections with calculations & conditions.

Images & QRCodes

DocumentDOCX

Template example demonstrating dynamic image insertion and QR codes - single or multiple with captions.

Sample Document

DocumentDOCX

Sample document template with fields, sections, and formatting for demonstration purposes.