Maptitude GISDK Help |
Gets the last record in a view or selection set based on a sort order.
record_handle = GetLastRecord(string view_set, array sort_order)
Argument |
Contents |
view_set |
The view and the set of records to consider |
sort_order |
An array indicating the desired sort order, or null for natural order. The array is an array of field name-order pairs: |
Element |
Type |
Contents |
1 |
String |
The name of the field |
2 |
String |
"Ascending" or "Descending" |
The record handle (string) for the last record in the input view and set when sorted as specified; or null if the input view and set has no records.
The returned record is also set as the current record.
GetLastRecord() performs any necessary indexing.
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.
first_emp = GetLastRecord("Employees", {{"LNAME", "Ascending"}})
first_emp = GetLastRecord("Employees", {
{"LNAME", "Ascending"},
{"FNAME", "Ascending"}
})
Error Type |
Meaning |
NotFound |
The specified view or set does not exist; or some field in the sort_order array does not exist |
Function |
Summary |
Finds the first record in a view or selection set based on a sort order |
|
Gets the next 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 |