MAXUse this function to determine 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. Collection form syntax Code Block |
---|
MAX ( attribute ) |
List form syntax Code Block |
---|
MAX ( [ value1 , value2 , ... ] ) |
[ value 1value1 , value 2value2 , … ] - A list of attributes, expressions or fixed values of any type of number or date. Use the square brackets to indicate that the arguments form a list of values.
Examples Suppose the following domain model. Entity.attribute | Value | Multivalued relation | Entity.attribute | Values |
---|
Residence. appraisalValue appraisalValue Residence. askingPrice askingPrice Residence.mortgage | € 140000 € 150000 € 142000 | hasBiddings | Bidding.amount |
If you want to determine the highest bidding on the current residence: If you want to determine the highest Goal | Expression | Result | Type |
---|
To determine the largest amount within the appraisal value, the asking price and the mortgage |
: | MAX ( [ Residence.appraisalValue , Residence.askingPrice , Residence.mortgage ] ) | € 150000 | Currency | To determine the highest bidding on the current residence | MAX ( Residence.hasBiddings.amount ) | € 139000 | Currency |
Include Page |
---|
| _nav_BackToTop |
---|
| _nav_BackToTop |
---|
|
|