Maptitude GISDK Help |
Samples the values of the specified field and returns the specified number of unique values.
vals = SampleValues(string field_spec, integer num_unique, integer num_scanned, array options)
Argument |
Contents |
field_spec |
A field spec |
num_unique |
Number of unique values to return |
num_scanned |
Maximum number of records to scan; 1000 is used if num_scanned is greater than 1000 |
No options are currently supported.
An array of unique values.
The records are read in natural order.
The returned array will be shorter than num_unique if not enough unique values are found in the first num_scanned records.
If a missing value is encountered among the scanned records, a null will be the first element of the returned array. Other elements in the returned array are in increasing order of occurrence.
SampleValues() displays a progress bar when scanning 500 or more records. To add a Cancel button to the progress bar, precede the function call with an "on escape" clause. For more information, see Error Handling.
Vals = SampleValues("Population", 20, 200,)
Error Type |
Meaning |
Error |
The input field specification is ambiguous |
Escape |
The user clicked Cancel |
NotFound |
The input field does not exist |
Function |
Summary |
Reads the values of one or more fields in any number of views |
|
Reads the values of one or more fields for a record in a view |
©2025 Caliper Corporation | www.caliper.com |