A calculated field is a number custom field whose value is calculated automatically by AntsRoute from other fields and fixed values. You no longer need to work it out by hand, and the result is always up to date.
☝️ To find out more about custom fields, see Understanding custom fields.
Examples of use
- Parts invoiced (€) = Filters replaced × 12 + Seals replaced × 3
- Litres of product used = Area treated × 0.25
- Total weight (kg) = Number of pallets × 25 + Number of boxes × 8
- Deposit to refund (€) = Gas cylinders returned × 15 + Drums returned × 30
How does a calculated field work?
The value of a calculated field is defined by a calculation method:
- the calculation method is made up of one or more lines;
- each line multiplies two items: a fixed value or a number field;
- the field’s value is the sum of all the lines;
- each line can have a condition: it is then only taken into account if the condition is met.
The calculation method can contain up to 50 lines.
The value is calculated automatically every time the work order is saved. If a value used in the calculation is changed, even after the work order has been completed, the field is recalculated.
Step 1: access the settings
Calculated fields are available for work order custom fields and for fields filled in when validating a work order.
- Go to Settings.
- Open Custom fields.
- Click the Work order or Validation of a work order tab, depending on when the values used in the calculation are filled in.
⚠️ You must create a category before creating a field. To find out more, see Create and organise custom fields.
Step 2: create the calculated field
- Click Create a field.
- Enter the field Name, for example ‘Parts invoiced’.
- Choose the Category in which the field will be displayed.
- Under Field type, select Integer number.
- Under Input mode, select Calculated value.
The Calculation method section appears.
Step 3: define the calculation method
- On the first line, select the two items to multiply: a number field or a fixed value.
- To add a line, click + Add.
- To apply a line only in certain cases, click Add next to ‘If’ and set the condition.
- To delete a line, click the bin icon.
- Click Save.
💡 Both items on each line must be filled in before you can save the field.
Practical example
A heating engineer replaces filters invoiced at €12 and seals invoiced at €3. In the Validation of a work order tab, you create:
- two number fields, ‘Filters replaced’ and ‘Seals replaced’, which the engineer fills in when validating the work order;
- a calculated field ‘Parts invoiced’, with two lines: Filters replaced × 12 and Seals replaced × 3.
If the engineer enters 2 filters and 4 seals, the Parts invoiced field automatically shows 36.
Which fields can be used in the calculation?
You can use any number custom field that is not private, including fields with a trigger.
You cannot use:
- a private field;
- another calculated field.
What happens if a value is empty?
If a value used in the calculation is empty, the calculated field has no value.
The same applies if the calculation uses a field with a trigger that has not been triggered: that field is treated as empty.
Where can I find the calculated value?
The calculated value appears:
- in the work order details;
- in PDF reports;
- in notifications;
- in webhooks;
- in exports.
You can also filter and sort your work orders on a calculated field.
In the mobile app
Agents see a live preview of the value as they fill in the fields, even without a network connection. The preview also works when they edit a work order that has already been validated.
☝️ Good to know:
- A calculated field can be used in your custom price calculation.
- A calculated field cannot have a trigger. To find out more about triggers, see Create conditional fields.
- A field used in a calculation method cannot be deleted.
- The value of a calculated field cannot be entered manually. If a value is sent for this field via the API, an import or a bulk edit, it is ignored.
Need help?
🙋♀️ Our support team is available by email at contact@antsroute.com or via the chat in the web interface.