Defining calculation fieldsUse calculation fields to perform calculations on the following types of data: text, number, date, time, or container.The data in a calculation field is the result of a formula that you specify. The result can be one of these types of data: text, number, date, time, or container.
1.
2. In the Manage Database dialog box, click the Fields tab.
4. For Field Name, type a name for the field.
5.
6. Click Create.
7. Setting the context for a calculation is only necessary when you're creating a calculation field in a source table that has two or more occurrences in the relationships graph. The choice you make may affect the calculation results, particularly if your calculation will include fields in related tables.For more information on the use of context in calculations, see Choosing the evaluation context for a calculation field.Click where you want the item to appear in the formula box, then do the following. (You can also type the formula into the box.)
Comparison or logical operator, or an exponent For Operators, double-click an operator in the list or type an operator. See Comparison operators and Logical operators. Constant value In the functions list, double-click a function. In the formula box, replace the placeholder parameter with a value or expression.
•
• Press Insert (Windows) or the Space bar (Mac OS) to place it in the formula box.
Make a calculated field repeating Prevent calculation if all referenced fields are empty Select Do not evaluate if all referenced fields are empty.When enabled, FileMaker Pro does not evaluate a calculation if all fields used by the calculation are empty.
10. To select indexing and storage options for the field, click Storage Options, select options in the Storage Options dialog box, then click OK.
11. Click OK to close the Specify Calculation dialog box.Important To avoid confusion when using dates in FileMaker Pro, always define calculation formulas to enter four-digit years. For more information, see Conversion of dates with two-digit years.
1.
2. Click + in the column heading to add a new field.
3. Right-click the column heading for the new field, then choose Field > Field Type > Calculation from the shortcut menu.
4.
• You can type field names, operators, and functions in the Specify Calculation dialog box instead of using the fields or operators lists.
• A calculation field calculates a result from values in other fields in the current record, from related records using a relationship, or from fields defined with global storage options. (In contrast, a summary field produces a result using values in more than one record in the database. For more information, see Defining summary fields.)
• FileMaker Pro calculates the formula when you close the Manage Database dialog box. There may be a delay if your database contains many records (for example, 10,000).
•
• Calculations that include a related field, summary field, global value, or a reference to another unstored calculation are unstored.
•
• If any field on a layout containing unstored calculations is set to auto-resize, calculation results will be updated when the window is resized.
• You can reference container fields in calculations and display container data in calculation fields. For information, see Defining container fields.
• References to related fields can become invalid if the related file is missing, or if you delete a field in the related file. FileMaker Pro alerts you that a field reference is invalid when you display or change the calculation formula. Changing the field type in a related file may cause unexpected behavior.
• If your FileMaker Pro file accesses data from an ODBC data source, you can use supplemental fields to define unstored calculations or summary instructions that act on data coming from the external sources. For more information, see Using supplemental fields.
• If you are using FileMaker Pro Advanced, you can copy field schemas from one file and paste them into the same file or some other file. For more information, see Copying and pasting field schemas (FileMaker Pro Advanced).