Maptitude GISDK Help

LocateRecord()

Summary

Locates a record based on the value of a field.

 

Syntax

record_handle = LocateRecord(string view_set, string field_name, array value_array, array options)

 

Argument

Contents

view_set

The view and set of records to consider

field_name

The name of a field in the view

value_array

A one-element array containing the value for which to search; should be compatible with the type of the field.

 

Option

Type

Contents

Exact

Boolean

Whether to search only for a record whose value for field_name matches exactly ("True"), or for a record with an inexact match ("False")

 

Returns

A string indicating the record handle for the located record, or null if no record was found.

 

Notes

Example

 

// Find Hawaii in the State layer

rh1 = LocateRecord("U.S. States|", "Name", {"Hawaii"}, {{"Exact", "True"}})

 

// Find the first employee with a salary of $50,000 or more

rh2 = LocateRecord("Employees|Management", "Salary", {50000}, )

 

Error Codes

Error Type

Meaning

Error

Field_name or value_array is null, or the options array is non-null and invalid; or unable to perform necessary type-conversions on the input value

NotFound

The specified view or set or field does not exist

 

See Also

Function

Summary

GetFirstRecord()

Finds the first record in a view or selection set based on a sort order

GetRecord()

Returns the record handle of the current record of a view

SetRecord()

Sets the current record of a view

 

 

©2025 Caliper Corporation www.caliper.com