Table of Contents
Overview
This Custom Field returns the maximum of a group of arguments.
Syntax
MAX (n1, n2, n3)
Element | Description |
---|---|
n1,n2,n3 | List of numerical values or arguments. Can have as many values/arguments as required. |
Examples
MAX(10,15,25) will return a value of 25.
MAX(FIELDVAL(‘Price’),10)
Price | MAX |
5.00 | 10.00 |
10.00 | 10.00 |
15.00 | 15.00 |
17.50 | 17.50 |
In the example above MAX(FIELDVAL(‘Price’),10) looks at each value in the Price field and compares it to 10 and returns the maximum value. In row 1, the price is 5.00 and 10 is higher than 5 so ‘10.00‘ is returned. In row 3, the price is 15.00, which is higher than 10 so ‘15.00‘ is returned.
MAX(FIELDVAL(‘Price’),10,12)
Price | MAX |
5.00 | 10.00 |
10.00 | 10.00 |
15.00 | 15.00 |
17.50 | 17.50 |
In the example above MAX(FIELDVAL(‘Price’),10,12) looks at each value in the Price field and compares it to 10 and 12 and returns the maximum value. In row 1, the price is 5.00 and 12 is higher than 5.00 or 10 so ‘12.00‘ is returned. In row 3, the price is 15.00, which is higher than 10 and 12 so ‘15.00‘ is returned.