GetSummary()

Category: Summary

Syntax: GetSummary ( summaryField; breakField )


Parameters:

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

Description:

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.


Examples:

Given the following record set, sorted by Country, and a summary field called Sum_Sales defined as the Total of Sales:

Country

Region

Sales

U.S.

North

55,000

U.S.

South

45,000

China

North

35,000

China

South

40,000


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

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

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



FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net