- Open the Query Builder, and then click the Calculations button.
This button only appears if you are logged on as Admin.
- Click Add.
- Click the Properties tab.
- In the first box type a name that describes the purpose of the calculation.
The calculation name appears only in the Calculation Manager.
- In the second box type a name to be used in the calculation. It cannot contain any spaces or symbols. This is a required field. You will be unable to create a calculated field until this has been set.
When the calculated field is used in constructing a plugin or query, this name is displayed in the list of available fields.
- Click the Base Table drop-down arrow and select the main table used to create the calculated field.
If you are joining two tables, this is the parent table.
- Click the Calc. Type drop-down arrow and select a Calculation Type.
- Type a Description if you want to have a longer description of the field available.
- Click the Calculation tab.
- Determine if the values you want to use for the calculated field are in the selected Base Table.
The table displayed in the upper list view is the table you selected in the Properties tab.
- If the base table does not contain the values you need, change the base table rather than creating a join. Click the Properties tab and select another base table.
- Create the calculation.
- Click + or - to expand or collapse the list of tables and fields to find the first field for the calculation.
-
To add a field, click the field in the upper box to add it into any position within the calculation.
This is the first field in the calculation.
- Do one of the following:
- Click an operator if you are creating a numeric calculation.
You must insert an operator between fields in a numeric calculation.
- For a string, you do not need to pick an operator, but you may want to insert a space for the sake of appearance.
- Click another field in the tree view to add it to the lower tab view or enter an integer.
- Continue adding fields as necessary to build the calculated field.
- Use brackets to group calculations. To insert a bracket, place your cursor in the calculation where you want to insert a bracket and click a bracket button. You must have both a beginning and ending bracket.
- Click OK.
- Click Close.