Syntax: GetSummary ( summaryField; breakField )
summaryFieldA field of type summary, or an expression that returns a reference to one.
breakFieldA field, or an expression that returns a reference to one.
Data type returned: Number, Date, Time, Timestamp
The GetSummary() function returns the value of summaryField when summarized by breakField. The found set must be sorted by breakField for GetSummary() to return the proper value.
GetSummary() returns the same values that you would see if you were to place the specified summary field in a subsummary report. GetSummary() is necessary when you need to use summarized values in calculation formulas or for display purposes while in Browse mode.
Note, you could also achive similar results using a self-join relationship and aggregate functions.
To calculate a grand summary value, use the same summary field for both the summary field and the break field parameters.
Given the following record set, sorted by Country, and a summary field called Sum_Sales defined as the Total of Sales:
A field SalesByCountry defined as
GetSummary (Sum_Sales; Country)
returns 100,000 for the two U.S. records and returns 75,000 for the two China records.
: FileMaker Specifications
FileMaker 8 Product Line
Specifications and Storage Limits
Field Types and Import/Export Formats
: Calculation Functions
Working with Calculations Primer
: Custom Functions
Custom Functions Primer
Useful Custom Functions
: Script Steps
Script Step Reference
: Quick Reference
FileMaker Error Codes
FileMaker Keyboard Shortcuts
FileMaker Network Ports
FileMaker Server Command Line Reference
FileMaker XML Reference
: Other Resources
Where to Go for More Information