The Calculations series contains the following articles.
- Calculations overview [this page]
- Basic calculations
- Table calculations
- Linked calculations
- History calculations
- Option calculations
- Text calculations
- Time calculations
- Date calculations
- Duration calculations
- URL generator
- Embedded event summary calculation
- Age calculations
- Personal details calculations
The purpose of the Calculations series is to familiarise you with the use of calculations within Smartabase.
In Smartabase, equations can be built to perform various types of calculations on the data located within a form (normally, within an event form). When a calculation field is added, there is a Calculation tab that allows you to enter these equations. They are based on a similar model to Excel: you can reference any field within the form and use some standard notation or built in functions to return a new value.
It is important to understand what data you expect from a calculation and choose to use the right calculation and functions, otherwise the calculation may fail or not work as expected.
Within Smartabase, it is possible to use standard operators to perform general calculations.
- + for addition,
- – for subtraction
- * for multiplication
- / for division
As with Excel, and other programming languages, use the standard order of operations to perform calculations so that the following precedence exists:
- Exponents and Roots
- Multiplication and Division
- Addition and Subtraction
Brackets can also be used to split up a calculation; operators within brackets are performed before operators outside of brackets. For example:
3 + 4 * 2
This would return 11, since the multiplication occurs before the addition. However:
(3 + 4) * 2
This would return 14, since the addition within brackets occurs before multiplication.
In addition to the standard operators, Smartabase also has many built in functions that can be used. Basic functions such as Sum, Min and Max can be used, as well as some more advanced functions like Log or Sqrt. To see a full list, select the Available Functions dropdown at the bottom of the Calculation tab. You can select the tooltip to see details about a specific calculation.
Additional information about functions is contained in the Functions series.