Skip to main content Skip to complementary content

RangeMaxString - script and chart function

RangeMaxString() returns the last value in the text sort order that it finds in the expression or field.

Syntax:  

RangeMaxString(first_expr { , Expression})

Return data type: string

Arguments:  

The argument expressions of this function may contain inter-record functions with a third optional parameter, which in themselves return a range of values.

Argument Description
first_expr The expression or field containing the data to be measured.
Expression Optional expressions or fields containing the range of data to be measured.

Examples and results:  

Examples Results
RangeMaxString (1,2,4)

Returns 4

RangeMaxString ('xyz','abc')

Returns 'xyz'
RangeMaxString (5,'abc') Returns 'abc'
RangeMaxString (null( ))

Returns NULL

Example with expression:

RangeMaxString (Above(MaxString(MyField),0,3))

Returns the last (in text sort order) of the three results of the MaxString(MyField) function evaluated on the current row and two rows above the current row.

Data used in examples:

Tip noteDisable sorting of MyField to ensure that example works as expected.
MyField RangeMaxString(Above(MaxString(MyField),0,3))
10

10

abc abc
8 abc
def def
xyz xyz
9 xyz

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!