Gets the minimum value in a range for a field.

Value := FieldRef.GETRANGEMIN

Parameters

FieldRef

Type: FieldRef

Refers to the current field.

Property Value/Return Value

Type: Text constant or Code

Contains the minimum value of the range set for the field referred to by the FieldRef.

The data type of value must match the data type of the field referred to by the FieldRef.

Remarks

This function is like the GETRANGEMIN Function (Record) function.

Example

The following example opens the Customer table as RecordRef variable, creates a FieldRef for the first field (No.) and stores the reference in the MyFieldRef variable. The SETFILTER Function (FieldRef) sets a filter that selects records in the range 10000 to 40000 from the No. field. The GETRANGEMIN function retrieves and stores the minimum value that is set in the filter, stores the value in the varMin variable and displays it in a message box. The varMin variable contains 10000 which is the minimum value that is set in the filter. This example requires that you create the following variables and text constant in the C/AL Globals windows.

Variable name DataType

CustomerRecref

RecordRef

MyFieldRef

FieldRef

varMin

Text

Text constant ENU value

Text000

The minimum value in the filter is %1.

 Copy Code
CustomerRecref.OPEN(DATABASE::Customer);
MyFieldRef := CustomerRecref.FIELD(1);
MyFieldRef.SETFILTER('10000..40000');
varMin := MyFieldRef.GETRANGEMIN;
MESSAGE(Text000, varMin);

See Also