MAX

Returns the maximum value among the values displayed in the rows of the table control.  The function accepts values only from textbox, label and literal controls.  This function is called as <TableControlName>.MAX("<ControlName>"). Use a TableControl instance to indicate which TableControl contains the values to be operated on by the function, e.g., Order_DetailsTableControl, ProductsTableControl, and CategoriesTableControl.

Please note that the maximum value returned in the value from the rows currently displayed.  This is not the maximum value for all values currently in the database.  So if only ten rows are displayed within the table control out of a million rows in the database, the MAX function will return the maximum of the ten displayed on the web page.

Syntax

= <TableControlName>.MAX(controlName)

Parameters

controlName

It represents the name of the control which contains the values whose maximum value is to be calculated. The controlName should be a string (e.g., “UnitPrice”, “Quantity”, “Discount”). The values in the control can be an integer (e.g., 37), a decimal value (e.g., 37.48), or a string.

Return Type

Decimal

Examples

Example

Returns

= ProductsTableControl.MAX(“UnitPrice”)

The maximum of the values displayed in the rows of the “UnitPrice” control.

= Order_DetailsTableControl.MAX ("Quantity")

The maximum of the values displayed in the rows of the “Quantity” control.

= Order_DetailsTableControl.MAX ("Discount")

The maximum of the values displayed in the rows of the “Discount” control.