Formulas are used to run calculations on connected records and store the total of that calculation. The following are common examples of when formulas are used:
Order Total: an Order record sums the prices of all the Item records connected to that Order.
Average Sale: a Salesperson record averages the total of all the Sales records connected to that Salesperson.
Employee Count: a Company record counts all the Employee records connected to that Company.
Add Formula Fields
To add a formula field, first click on an object in your builder’s Data section, and then hover your mouse over the Number field category. From here, select any of the fields indicated below.
Note: If you do not see these options, the object in question does is not connected to many of any other object.
The following are different types of formulas you can add:
Sum: all records for a given field on a connected object added together.
Max: the highest value for a given field on a connected object.
Min: the lowest value for a given field on a connected object.
Average: the sum of all the records’ values for a given field on a connected object divided by the total number of records.
Count: the total number of connected records.
When you add a formula field, you must select from a list of eligible fields on which you will run the calculation. Ineligible fields will not appear as options.
In order to be eligible, the field type must be numeric (e.g. Number, Equation), and the object to which you add the formula field must be connected to the object on whose field data you want to run your calculation. That connection must allow for many records to be connected to the object to which you are adding your formula field; for example, a Sale connected to many Line Items could use formula fields to tally up data for a specific Line Item field.
Formulas and Record Processing
If you add a formula field to an object with existing records, the formula will start calculating for those records immediately. With many records, these calculations could take some time, so please be patient.
You can add formulas based on other formulas and equations. When a record is updated all the equations will be updated first, then any equations and formulas from parent records connected to the updated records. If those connected records have additional records connected to them, those formulas will also update.