max_of
Gives the largest of the numbers of a list or a set, or of one field of its items. Items whose value is not a number are left out. An empty list gives null. A cloud set is read on the server.
Runs on: either side: the compiler places the statement that calls it where the values it uses live.
Format:
max_of(set_or_list [, field])
Parameters:
| Parameter | Type | Description |
|---|---|---|
| set_or_list | mixed | the set or list |
| field | string |  [Optional]the name of the field; without it the items themselves are the numbers |
Returned Value:
| Type | Description |
|---|---|
| number | the largest value, or null |
Examples
latest = max_of(entries, "created_at")