Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColorwhite

MAX


Determines the maximum value of a list or collection.


The MAX function has two syntax forms: the collection form and the list form. You can use the collection form to determine the maximum value of all occurrences of an attribute. The list form is used to determine the maximum value of a set of different attributes.


1. Collection form syntax

Code Block
MAX ( attribute )


Input

  • attribute - An attribute of any type of integer, number, date or string of which multiple instances can occur at runtime.


2. List form syntax

Code Block
MAX ( [ value1 , value2 , ... ] )


Inputs

  • [ value1 , value2 , … ] - A list of attributes, expressions or fixed values of any type of integer, number, date or string. Use the square brackets to indicate that the arguments form a list of values.


Examples

Suppose the following domain model.



Entity.attributeValueMultivalued relationEntity.attributeValues

Residence.appraisalValue

Residence.askingPrice

Residence.mortgage

€ 140000

€ 150000

€ 142000

hasBiddingsBidding.amount

€ 132000

€ 139000

€ 137500

GoalExpressionResultType
To determine the largest amount within the appraisal value, the asking price and the mortgageMAX ( [ Residence.appraisalValue , Residence.askingPrice , Residence.mortgage ] )€ 150000Currency
To determine the highest bidding on the current residenceMAX ( Residence.hasBiddings.amount )€ 139000Currency


Example with strings

ExpressionResult
MAX( ["after", "action"] )"after"


Back to top

Panel

All statistical functions

Children Display
pageStatistical functions

Expression function reference

Children Display
pageExpression function reference