You are here: Home / Extras / Formulas and calculating / Administration

Formulas and calculating

Administration

The prerequisite for the calculation is the activation of the automatic field calculation and the storage of a calculation formula  in the administration.

Calculation: The result of a formula is always calculated when the data set is saved. This means that if you have stored a formula for a field, the calculation result is not entered in a record until you save the record again.

Enter formula

The formulas for fields are entered in the administration . Click on the edit icon Edit Symbol in the “Formula” column to open the formula editor. The form input icon is displayed only for the allowed field types (number fields, checkboxes, text fields and custom fields). If a formula is stored in a field, the formula symbol  is displayed in the overview. To find out which formula is stored there, either click on the formula symbol or leave the mouse briefly over the symbol, then the formula is displayed as a mouseover.

As soon as a formula has been entered and saved, a formula symbol  also appears next to the input field to indicate that a formula exists for this field.

Overview, deletion, overwriting, editing and order of calculation

Overview

If you click on the pencil icon Edit Symbol in the column header, you will get an overview of all formulas that have been created.

Formula popup for addresses
Created formulas for properties

The formulas of all categories of a module (addresses or properties) are displayed collectively.

Delete

In the overview you can also delete formulas via the trash can icon Trashcan symbol . Indirectly, formulas are deleted when you delete a field that is used in a formula. A warning message appears when the field is cleared: “The field is used in formulas for the following fields: xyz When the field is deleted, the formulas are also removed.”

Overwrite

If a value is already stored in a field for which a formula is stored, you can have this value overwritten. You can make this setting using the editing pen next to the formula column heading. This can be specified for each individual formula. In this case, fields that are overwritten are displayed grayed out and not editable

By default, the setting for the system formulas is applied.

Edit

For fields that are calculated automatically, i.e. those that have the Overwrite checkbox set, the Edit option can also be checked. This has the consequence that this field in properties or addresses may be edited by you. Doesn’t make sense at first glance? Here is an example:

A prospective buyer purchases a home from an agent and pays the commission in installments. The broker would like to add newly paid installments and have them totaled automatically. For this purpose, he adds the “Commission rate” and “Total commission” field.

For the total, it stores the formula “Total commission = Total commission + Commission rate”. However, the commission rate should always be reset to “0” after the agent enters the rate and saves the property – so the “Overwrite” option must be active to make an entry in the Commission Rate field.

Order

In some cases, a calculated result is used in another formula. Then the order of calculation is important. In general, system formulas are always calculated first, followed by the individually entered ones in the order they appear in the overview list. You can change the order via an entry in the “Pos” column.

Calculation – When calculate formulas

For formulas to calculate, some conditions must apply.

  1. For the calculation, all fields to be calculated must be activated in the administration.
  2. If fields are deactivated but their values are still stored in the fields, they will not be used for calculation.
  3. Fields which are hidden by field filter, no matter if formula or value, are used for calculation.

Recalculation via user right

In the user rights, the “Recalculate formulas for all writable fields” right can be set for addresses and properties . This allows the user to recalculate the results, in individual addresses or properties, for the fields that can be overwritten using the More Actions >> Recalculate Fields action bar. Values entered manually are overwritten in this way.