Maptitude GISDK Help |
Gets the aggregation rules for a field.
aggr = GetFieldAggregations(string field_spec)
Argument |
Contents |
field_spec |
The field specification |
An array of aggregation modes that are set for this field.
If several records are combined in a one-to-many join, the aggregations array describes how to collapse them for this field. E.g., "Sum" means that the join should contain a new field with the sum of the field field_spec in all the records that were collapsed.
The returned array can contain an element that is a one-element array with one of the strings "Dom", "Sum", "Min", "Max", or "Count", giving rise to a joined field containing the first value, sum of values, minimum value, maximum value and the number of records, respectively. The returned array can also contain an element that is a two-element array with the strings "Avg" and a field name, where the field name refers to a field containing a weight factor to give a weighted average.
If a record has a missing value in the field, it will not be included in the aggregation.
If the input field has no aggregation rules, GetFieldsAggregations() returns null.
// Check whether aggregation of the Population field will include counts
aggr = GetFieldsAggregations("State.Population")
has_max = False
for i=1 to aggr.length do
if aggr[i][1] = "Max" then has_max = True
end
// has_max is True if aggr is of the form aggr = {...,{"Max"}, ...}
if has_max = False then
ShowMessage("Note: A join will not contain a maximum population field.")
Error Type |
Meaning |
NotFound |
The specified view or field was not found |
Error |
Invalid field specification |
Function |
Summary |
Returns a list of fields that support aggregation rules |
|
Gets a list and description of the fields in a table |
|
Creates a joined view by linking fields in two existing views |
|
Creates a joined view by linking multiple fields in two existing views |
|
Modifies the file structure of a dBASE, fixed-format text, or fixed-format binary table |
©2025 Caliper Corporation | www.caliper.com |