Maptitude GISDK Help |
Reads the values of one or more fields for a record in a view.
values_array = GetRecordValues(string view, string record_handle, array field_names)
Argument |
Contents |
view |
Name of the view |
record_handle |
The record to read, or null for the current record |
field_names |
An array of field specs or names of fields to read, or null for all fields |
An array of field spec-value pairs. Each pair corresponds to one field and its value and has the following format:
Element |
Type |
Contents |
1 |
String |
The field spec for the field |
2 |
Various |
The field's value. The type depends on the field being read. A null denotes a missing value (for any type). |
The pairs in the returned array are ordered identically to the input field_names array.
If the input field_names array is null, GetRecordValues() reads all fields and returns the array in the natural order of fields in the view.
If view_name is null, GetRecordValues() uses the current view.
If the input record_handle is null, GetRecordValues() reads the current record.
GetRecordValues() does not change the current record.
//Open BDOCUMENTS\CALIPER\\< product name>\TUTORIAL\NElayers.wrkz
tutorial_folder = RunMacro("G30 Tutorial Folder")
wrkz = OpenWorkspace(tutorial_folder + "NElayers.wrkz")
rh = LocateRecord("County|", "[County Name]", {"SUFFOLK MA"}, )
vals = GetRecordValues("County", rh, {"[County Name]", "Population",
"[Per Capita Income]"})
ShowArray(vals)
Error Type |
Meaning |
Error |
The record_handle is null and the view has no current record; or the record_handle is non-null but invalid; or GetRecordValues() encountered file reading errors. |
NotFound |
The specified view, or one or more of the specified fields, does not exist. |
Function |
Summary |
Locates a record based on the value of a field |
|
Gets the record handle of the current record of a view |
|
Reads the values of one or more fields for a record in a view |
|
Sets the current record of a view |
|
Updates the data for a record in a view |
©2025 Caliper Corporation | www.caliper.com |