1. Where you enter a formula
- In the left menu, open the ADM tab (if shown), open the Shift planning group, select Shift planning and click the Settings (gear) button.
- Click Add setting, or the pencil icon in the row of an existing setting.
- In the Calculation type section, choose Formula. Section 3 becomes Formula, with the input field and the Insert buttons.
2. Writing a formula
A formula calculates the column's hours from other columns. Write column codes in square brackets: [RR], [NR].
What you can use
- Codes of standard settings:
[RR],[NR],[GO]… - The variables
[MN],[MNZ]and[Employee.Polje]. - The operators
+-*/and round brackets. - Decimals with a dot or a comma:
0.5or0,5.
Rules
- A formula cannot use the code of another formula — such a code counts as 0.
- An unknown code counts as 0.
- A negative result is shown as 0.
Example: ([RR]+[NR])*0.5 = half of the sum of regular and night work.
The Insert buttons below the field add a code at the end of the formula, so you do not have to type the brackets.
3. Variables
| Variable | Meaning |
|---|---|
[MN] | Monthly norm: the number of working days (Monday–Friday) in the month × 8 hours. |
[MNZ] | The employee's maximum working hours in the month — like MN, but counting only the days between the start and end of employment if the employee joined or left during the month. |
[Employee.Polje] | The value of an additional employee field; replace Polje with the field's system name. An empty field counts as 0. |
Example
The month has 22 working days: [MN] = 176. The employee started on the 15th and has 11 working days until the end of the month: [MNZ] = 88.
4. Errors and warnings on saving
When you click Save, the app checks the formula.
Errors — the formula is not saved
- Enter a formula — the field is empty.
- Code is not in square brackets — e.g.
(DR+[NR])*0.3. The app suggests the fix([DR]+[NR])*0.3; clicking Apply suggestion puts it in the field. - The formula is not valid — check the brackets and operators (e.g. an extra bracket, two operators in a row).
Warnings — saving after confirmation
If the formula uses a code that does not exist as a standard setting, or is itself a formula, the calculation uses 0 for that code. The app shows this; if it is intended, click Save again with the same formula.
Changing or deleting an abbreviation
When you change or delete an abbreviation that formulas use, those formulas calculate 0 for the old code until you fix them.
5. Example formulas
| Column | Formula | Meaning |
|---|---|---|
| Total work | [RR]+[PR]+[NR] | sum of all work columns |
| Overtime | [RR]+[PR]+[NR]-[MNZ] | hours above the employee's monthly norm (below the norm = 0) |
| Night work allowance | [NR]*0.3 | 30% of night hours |
| Half of the sum | ([RR]+[NR])*0.5 | half of the sum of regular and night work |
6. Where to go next
- Hours calculation settings — basics and examples — all other fields of the form and the column order.
- Shift planning — overview — where the hours columns are shown.