Calculation field

Written by Support Ubikey
Updated 2 weeks ago

What is a calculation field?

A calculation field is a new field type for your post-its. It enables you to calculate a value for each post-it from variables coming from document formulas or from post-it extended fields. Used variables can be of numeric, duration or date type.

The result of a calculation field can be of numeric, duration or date type depending on the specified expression.

The calculated values will be available as a variable in your document and will enable you to create filters, document formulas or others calculation fields.

Values of calculation fields are calculated automatically in real time from the variables you used to define it.

Create a calculation field

To create a new calculation field, click on the icon "Settings" in the document toolbar, then within the extended fields part, click on "Edit list".

The list of the fields assigned to post-its in the document opens. In the "Add" field, type in a name for the new field, select "Calculation" type and click on "Create".

The calculation field configuration window opens :

(1) Choose a name for your field.

(2) In the "Formula" field, define the wanted calculation : you can use numeric values, basic operators (+, -, *, /, (, ) ) and variables of your document.

To call a variable, use the @ key on your keyboard and choose the wanted variable in the list.

(3) Search for a variable.

(4) Filter list by variable type.

(5) List of available variables, click on a variable to add it to the expression.

(Detail of available variables)

For variables from the post-its fields (each post-it can have a value for the field), 5 functions are availables :

  • On the post-it (use value entered on the post-it)
  • Sum (of all values entered on the post-its)
  • Average (of all values entered on the post-its)
  • Min (smallest value among entered values on the post-its, earliest value for dates)
  • Max ( biggest value among entered values on the post-its, latest value for the dates)

Attribution of a type (unit) to an extended field

(6) While entering an expression, a type (numeric, duration or date) will be automatically attributed to the field depending on the used variables (see : Detail of variable operation)

Errors management

Some operations are not autorised because they are mathematically invalid or because we do not support the resulting unit (see: Detail of operation on variables)

(7) The formula field displays an error and the associated details below. You must edit the expression or convert a variable (see below) to make the formula valid again. 

Conversion of variables

In some cases it might be usefull to convert a duration variable into a numeric variable to solve an invalid operation. For that, right click on the variable you want to convert and choose the conversion unit.

For example : I want to convert my duration variable (value = 2 minutes) into a numeric variable in seconds (value = 120).

You can also convert a numeric variable into a duration variable with the same process.

Edit a calculation field

In order to edit a calculation field, open the "settings" tab, go to the "Extended fields" section and click on the "Edit" button. Hover your cursor over the calculation field and click on "Edit".

You can edit the name and formula of your field (see above).

In the case of a change that would modify the field type, the "Dependencies" section enables you to check if the field is used elsewhere (document formulas or other extended fields) and if the type change make the dependencies invalid or not.

Use a calculation field

The value of the calculation field on each post-it is automatically calculated, you cannot edit this value directly on the post-it.

The calculation field value is displayed as any other field values on the post-its.

If a variable that compose the calculation field cannot be calculated (error status) then the calculation is declared not calculable and will display an error status.
If a variable has no value (no value in the post-its field), then the field will display a no value status (--).

Did this answer your question?