How to use Calculations

Create custom calculations inside your templates

Christian Nicolaisen avatar
Written by Christian Nicolaisen
Updated over a week ago

You can create calculations inside your document and templates. The sum of a calculation can be shown within a document field (works on text field and tags)

Open the settings of the text field you wish to show the result of your calculation. Check mark option: Calculation. Here you enter the calculation of your choice.

A calculations can be done by using simple math. The calculation can use values of other document fields within its template.

To use a document field inside a calculation you enter brackets around the name of the document field, for e.g: [document field]. Remember that if your document field has mutiple words using space, you also have to add this spaces, as shown in the example.

Example of calculations:

Add sum of two fields

You have a document field called Price with tax. Here you want to display Price + Tax. Inside the calculation for Price with tax you enter:

[price] + [tax]

Greater than values show text

In this case if the document field value of Amount is greater than the document field value of Budget then show On budget, if less then show Under budget.

=IF([Amount] > [Budget], "Over budget", "Under budget")

Greater than values show text

In this case if the document field value of Amount is greater than the document field value of Budget then show Over budget, if less then show Under budget.

=IF([Amount] > [Budget], "Over budget", "Under budget")

If a value is x show y

In this case if the document field value of Amount is 1000, then display: One thousand, otherwise display: Not one thousand.

=IF([Amount]=1000,One thousand,Not one thousand)

Did this answer your question?