Steps through a specified number of records and retrieves a
record.
|
Steps := Record.NEXT([Steps])
|
Parameters
- Record
-
Type: Record
The record from which the search begins.
- Steps
-
Type: Integer
Specifies the direction of the search and how many records to
step over. This parameter follows the following rules:
If you do not specify this parameter, the next record is
found.
Property Value/Return Value
Type: Integer
The number of records inspected which meet the criteria of any
filters and the current key. This value can be less than
Steps, depending on the number of
records in the table. If the table is empty, then zero is returned
and Record does not change.
Remarks
Example
This example requires that you create the following
variables in the C/AL Globals window.
Variable name |
DataType |
Subtype |
Count
|
Integer
|
|
CustomerRec
|
Record
|
Customer
|
|
Copy Code |
Count := 0;
IF CustomerRec.FIND('-') THEN
REPEAT
Count := Count + 1;
UNTIL CustomerRec.NEXT = 0;
|
This code uses a REPEAT UNTIL loop to count the number
of entries in the Customer table. The FIND function finds the first
entry in the table. Each time the NEXT function is called, it steps
one record forward. When NEXT equals zero (0), there are no more
entries in the table and the loop is exited.
See Also