“Formula” fields bring the power of Excel formulas directly into Advanced Document Automation. By utilizing “Formula” fields, you can perform mathematical operations on other fields and automatically calculate the dynamic data that your document needs.

When creating a formula field, the formula may contain static values, references to other fields, or both. Almost anything you can do in Excel, you can do with a template field.

# Referencing fields

To use a field in a calculation simply enter the name of the field surrounded by braces:

{Price} * {Number of items} * 10

# Formula reference fields

# Formatting

You can specify the format for the result of a formula field if the result is a date or a number. The “format” dropdown within the formula field will allow you to select from several date formatting options as well as integer, decimal and currency formatting options.

# Errors

**#ERROR!**General error.**#DIV/0!**Divide by zero error.**#NAME?**Unrecognized function name or variable name.**#N/A**Indicates that a value is not available to a formula.**#NUM!**Occurs when formula encounters an invalid number.**#VALUE!**Occurs when one of formula arguments is of the wrong type.

**NOTE: **When referencing fields within functions, you may see **#ERROR!**, **#NAME?**, or **#VALUE! **errors. This usually means that the field you're referencing either doesn't have a value or that you haven't entered the name of the field exactly as it is spelled. Check both the spelling of the field that you're referencing and that it has a value.

# Frequently used formulas