Maptitude GISDK Help

FieldsSupportAggregations()

Summary

Returns a list of fields that support aggregation rules.

 

Syntax

aggr = FieldsSupportAggregations(string view, array fields, array options)

 

Argument

Contents

view

The name of the view

fields

A list of fields to be considered

 

No options are currently supported.

 

Returns

An array of fields that allow their aggregation modes to be set.

 

Notes

Example

// Change the aggregation settings for the Population field.

table = GetTableStructure("State") // Get all the settings of the table

aggr = FieldsSupportAggregations("State", {"White", "Black", "Population"}, )

if ArrayPosition(aggr, {"Population"}, ) <> 0 then do

// We can set aggregation rules for "Population"

     for i = 1 to table.length do

          if table[i][1] = "Population" then

// Set the new aggregation rules:

               table[i][7] = {{"Sum"},{"Count"}, {"Max"}}

// For ModifyTable: add the original field name

          table[i] = table[i] + {table[i][1]}

          end

     ModifyTable("State", table)

     end

else

     ShowMessage("Cannot set aggregation rules for the Population field.")

 

Error Codes

Error Type

Meaning

NotFound

The specified view or field was not found

Error

Invalid field specification

 

See Also

Function

Summary

GetFieldAggregations()

Gets the aggregation rules for a field

GetTableStructure()

Gets a list and description of the fields in a table

JoinViews()

Creates a joined view by linking fields in two existing views

JoinViewsMulti()

Creates a joined view by linking multiple fields in two existing views

ModifyTable()

Modifies the file structure of a dBASE, fixed-format text, or fixed format binary table

 

 

©2025 Caliper Corporation www.caliper.com