Max()

Category: Aggregate

Syntax: Max ( field {; field...} )


Parameters:

fieldAny related field, repeating field, or set of non-repeating fields that represent a set of numbers. Parameters in curly braces { } are optional and may be repeated as needed, separated by a semicolon.

Data type returned: Text, Number, Date, Time, Timestamp

Description:

Returns the largest valid, non-blank value from the set of values specified by the field parameter.

When the parameter list consists of two or more repeating fields, Max() returns a repeating field in which the corresponding repetitions from the specified fields are evaluated separately. So, if a field Repeater1 has three values, 16, 20, and 24, and another field, Repeater2, has two values, 14 and 25, Max (Repeater1; Repeater2) would return a repeating field with values 16, 25, and 24.

Because dates, times, and timestamps are represented internally as numbers, the Max() function can be used to compare data of these data types. For instance, to return the later of two dates, you could use the following type of formula:

 GetAsDate (Max (Date (4; 1; 2005); Get (CurrentDate)))


This would return either 4/1/2005 or the current date, whichever is greater.

Examples:

Function

Results

Max (44; 129; 25)

Returns 129.

Max (repeatingField)

Returns 54 (when repetition 1 = 18, repetition 2 = 10, and repetition 3 = 54).

Max (Invoice:InvoiceAmount)

Returns the largest invoice amount found in the set of related Invoice 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