Maptitude GISDK Help |
Gets the next record in a view or selection set based on a sort order.
record_handle = GetNextRecord(string view_set, string start_record_handle, array sort_order)
Argument |
Contents |
view_set |
The view and the set of records to consider |
start_record_handle |
A "starting point" from which the next record is derived, or null to start from the current record |
sort_order |
An array indicating the desired sort order, or null for natural order. The array elements are field name-order pairs: |
Element |
Type |
Contents |
1 |
String |
The name of the field |
2 |
String |
"Ascending" or "Descending" |
A string indicating the record handle for the next record in the input view or set when sorted as specified; or null if the starting record is the last record.
The returned record is also set as the current record.
GetNextRecord() performs any necessary indexing automatically.
The first pair in the sort_order array specifies the primary sort order. The second pair, if present, specifies the secondary sort order, and so on.
order = {{"Population", "Descending"}}
rh = GetFirstRecord("U.S. States|", order)
while rh <> null do
// Process the record
rh = GetNextRecord("U.S. States|", null, order)
end
Error Type |
Meaning |
Error |
Start_record_handle is invalid; or start_record_handle is null and the input view has no current record |
NotFound |
The specified view or set does not exist; a field in the sort_order array does not exist; or the start record is not in the set or was deleted from the view |
Function |
Summary |
Finds the first record in a view or selection set based on a sort order |
|
Gets the last record in a view or selection set based on a sort order |
|
Finds the previous record in a view or selection set based on a sort order |
|
Gets the record handle of the current record of a view |
|
Gets an array of record handles for a selection set |
|
Locates a record based on the value of a field |
|
Sets the current record of a view |
©2025 Caliper Corporation | www.caliper.com |