Skip to main content



Max Function

Returns largest value of a member field or expression across a collection.

Syntax 1

Max(collection, field)

Returns largest value of a member field or expression across a collection.

Arguments

collection Collection - A collection.

field Field - The field to use to find the maximum.

Syntax 2

Max(collection, expression)

Returns largest value of a member field or expression across a collection.

Arguments

collection Collection - A collection.

expression Expression - An expression that resolves to a value.

Syntax 3

Max(collection, field, filter)

Returns largest value of a member field or expression across a collection.

Arguments

collection Collection - A collection.

field Field - The field to use to find the maximum.

filter FilterExpression - Filter criteria. Only collection members that match this criteria will be considered.

Syntax 4

Max(collection, expression, filter)

Returns largest value of a member field or expression across a collection.

Arguments

collection Collection - A collection.

expression Expression - An expression that resolves to a value.

filter FilterExpression - Filter criteria. Only collection members that match this criteria will be considered.

Remarks

  • Arguments after the collection argument are evaluated in the context of a collection member.

Example:

Max(Vehicles, BI\_PD.Premium, Year=1999); // returns 10000