Choose where you’d like to start

Maximum

Note:

  • This task is applicable only to Zoho Creator.

Overview

The maximum function in the "aggregate records" deluge task returns the largest value of a specified field from records fetched based on given criteria.

The criteria is mandatory.

This function can be applied to the following field types:

  • Number
  • Percent
  • Currency
  • Decimal
  • Formula (numeric)
  • Date
  • Date-time

Return

Based on the specified field, the data-type of the returned value could be one of the following:

  • If the specified field type is Number, Formula(Bigint) or Lookup(Drop-down and Radio) the data type of the return value will be number.
  • If the specified field type is Percent, Currency, Decimal or Formula(decimal), the data type of the return value will be decimal.
  • If the specified field type is Date or Date-Time, the data type of the return value will be date-time.

Syntax

<variable> = <form_link_name> [<criteria>].maximum(<field_link_name>);

ParameterDescription
<variable>Holds the returned value.
<form_link_name>

Link name of the form from which the records have to be fetched.

<criteria>

Criteria based on which records will be fetched.

maximum(<field_link_name>)

Link name of the field to which the maximum function will be applied.

The "maximum" aggregate function can be applied to the following field types:

  • Number
  • Percent
  • Currency
  • Decimal
  • Formula (numeric)
  • Date
  • Date-time

Things to keep in mind

  • If you wish to fetch all records of the specified form, use the following script as criteria:
    [ID != 0]

    It is advisable to fetch all records only when absolutely needed. Fetching all records generates a load resulting in performance issues.

This task can be used in the following events

When a record is Created
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateYes
On SuccessYes
Other workflow events
On a scheduled dateYes
During approval processYes
During payment processYes
In a Custom FunctionYes
In an Action item in reportYes

Examples

The following script returns the maximum value of "age" field from the Employees form.

EmployeeDetails = Employees [ ID != 0 ].maximum(age);

Get Started Now

Execute