GETRANGEMIN Function (FieldRef)

Gets the minimum value in a range for a field.


Value := FieldRef.GETRANGEMIN  


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.


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


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.
MyFieldRef := CustomerRecref.FIELD(1);  
varMin := MyFieldRef.GETRANGEMIN;  
MESSAGE(Text000, varMin);  

See Also

GETRANGEMAX Function (Record)
FieldRef Data Type