Maptitude GISDK Help |
Attaches a translation table (codes) to an existing table.
AttachTableTranslation(string base_table, string code_view_set, string fldname_fld, string code_fld, string val_fld, array options)
Argument |
Contents |
base_table |
The name of a view referring to a table file |
code_view_set |
The name of the view and selection set containing the codes, separated by a vertical bar |
fldname_fld |
The column of code_view_set that contains the name of the field to which each code applies |
code_fld |
The column of code_view_set that contains the shorthand codes that are found in the base_table |
val_fld |
The column of code_view_set that contains the descriptive strings that will be displayed in place of the shorthand codes |
No options are currently supported.
This function is used to provide a lookup table that automatically converts short codes into longer, more descriptive strings. This feature helps to keep tables small while retaining readability. For more information about codes, see "Working with Codes" in the Maptitude Help.
The code table must contain at least three required columns, but can have any number of additional columns.
The code table must already be open (using OpenTable()) to be attached.
Once the codes are attached to the base table, the code table is no longer required or used.
When the translation table is attached, the lookup values are stored in a file with the same path and filename as the table, but with an extension of .axl for fixed-format text files, .bxl for fixed-format binary files, .cxl for comma or tab-separated text files, or .dxl for dBASE or FoxPro files.
If a translation table already exists when this function is called, the existing codes are replaced by the codes in code_view_set.
AttachTableTranslation("States", "Lookup Table|", "Field Name", "Code", "String to Display", )
Error Type |
Meaning |
NotFound |
One of the view names or field names is not valid |
Function |
Summary |
Removes a translation table (codes) from an existing table |
|
Creates a new table containing the codes and values that are part of an existing translation table |
|
Indicates whether a table has an existing translation table (codes) |
©2025 Caliper Corporation | www.caliper.com |