Work with calculations and custom functions

ADK can validate or evaluate FileMaker calculations before saving them. Use these checks before incorporating formulas into fields, script steps, layout objects, or custom functions.

Validate a formula

Validation confirms whether FileMaker accepts a formula within a specified table occurrence context. It identifies syntax, function, and field-reference errors without modifying the database schema.

Copy
Validate this calculation in the Orders table-occurrence context. Explain any FileMaker error and do not save it.

The coding agent checks the calculation function reference for parameter requirements and syntax rules before validating the expression.

Evaluate a formula

Evaluation computes the result of an expression in the current context. Use evaluation to test calculation logic, return types, and field values against live data. Because results can vary based on active records, related data, variables, account privileges, and table occurrences, specify the test context explicitly.

An expression that validates successfully may still produce unexpected values. Evaluate representative data cases before committing formulas to business logic.

Create or modify a custom function

Provide the function name, required parameters, calculation formula, and test cases to the agent. The agent checks project standards, validates the formula body, writes the custom function, and re-reads the committed definition.

Inspect existing calculations that call a custom function before renaming or deleting it. FileMaker can permit schema modifications that subsequently invalidate dependent calculations.

Specify calculation context

FileMaker evaluates unqualified field references through a table occurrence context rather than a base table. Always specify the target table occurrence when a formula references fields or related tables. Pure mathematical or string operations can validate without a table occurrence context.