# Using Field Calculations in FossLook Field calculation is a new feature that will allow you to perform custom calculations within your documents. You can create your own formulas, use functions like absolute values, summ and others.

In this article i'd like to introduce you to the absolutely brilliant new feature of FossLook - field calculation! Let's shed some light on this new function of the platform and see how you can use it in your business.

FossLook provides the ability to perform arithmetic operations with numeric and currency field types. Calculated field value may depend on the values of one or more other fields.

## Connecting External Module

All right, first thing we need to do, is to make sure that our external module "Calculated fields" is connected and running. If the external module is not listed, connect it using "Connect new module" button, and then restart FossLook Administrator.

Once you've done that, you now can start using new functionality of your server.

## Setting up Calculation Rules

To set up field calculation rules for the document field, firstly, open it in "Document libraries" and then select the "Calculated value" tab. For example, let's say that we have a document "Work Order", and the calculated field here is "Sum", which is equal "Hours" multiplied by "Price per hour", where "Hours" is a numeric field, and "Price per hour" has the currency type.

Using the "Fields" button, enter the desired formula. Note, that you can use various arithmetic operators and functions here, such as multiplication, division, raising to a power, absolute values, summ and others. Now you can check the result in the FossLook client. The field value will be calculated using entered formula. Ok, now let's complicate things a bit. Suppose we have an "Invoice" that has child documents - "Work orders", and the "Total" field is equal to the sum of values of all work orders in the document.

First, create an "Invoice" document type with the currency field "Total", and link "Word orders" as a child documents to it. (You can learn more about creating your own types of documents in the article "Creating a Custom Document Type") With your fields ready, edit the formula for the field "Total" in the invoice. It should be equal to the sum of values of all work orders. To do this, select the "Work orders", which, in turn, will open the fields of the child document, where you can select our desired field "Sum". To sum up the results we will use the "summ(expr)" formula.

Note: for now, you need to enter functions manually in the formula field.

## Viewing Results of the Calculation

Finally, moving back to the client, after creating a couple of work orders, we'll get the total price calculated automatically for our invoice.  Get
Free Version