Max Attribute Value

Retrieves the maximum values for the specified attribute among all elements in the business object array.

Inputs

Business object array
The business object array (specified as a BusObjArray object).
Attribute
A String that specifies the attribute name.

Output

Returns a String that contains the maximum value for the specified attribute.

Exceptions

The Max Attribute Value function block can throw the following exceptions, both of which are subclassed from CollaborationException :

For each of these exceptions, the Max Attribute Value function block can set the AttributeException exception type.

Notes

The Max Attribute Value function block looks for the maximum value for the specified attribute among the business objects in this BusObjArray. For example, if three employee objects are used, and the attribute is Salary which is of type Float, it will return the string representing the largest salary.

If the value of the specified attribute for an element in BusObjArray is null, then that element is ignored. If the value of the specified attribute is null for all elements, then null is returned.

When the attribute type is of type String, Max Attribute Value returns the attribute value that is the longest string lexically.

Related information

This function block is based on the BusObjArray.max() method. For more information, see max().

Copyright IBM Corp. 2004, 2005