Modify Table
Purpose
The Modify Table tool is provided for modifying structure of attribute or standalone tables. As a result, a new feature class or a standalone table with a specified structure, created on the basis of input table will be built.
Description
The tool allows creating a new feature class or a standalone table on the basis of input table - adding new fields, deleting existing fields, changing fields order, changing parameters of existing fields and setting parameters of new fields - all this is available for modifying input tables.
Output data type – table or feature class – depends on the presence of Shape field in the field schema. If the Shape field is absent, a table is created as output, otherwise – a feature class.
Modifying tables
The tool is available from the XTools Pro Table Tools, no matter if there are any feature layers or standalone tables added in the map or it is empty. Click on the tool icon to run the Modify Table tool.
-
Select input dataset, either a feature class or a standalone table.
-
Specify output dataset with the new modified table.
-
Define field schema (restructuring fields of the input dataset, importing fields from another table, loading from JSON file or defining the field schema manually).
-
Define the output field properties.
-
Select the output dataset parameters and data options.
-
Press Run to modify table.
Defining field schema
By default, output field schema consists of the input table fields. In the Schema dialog window (Define fields button) you can remove or modify these input fields, and add new fields either manually or importing fields from another table or feature class (Import fields button). Defined field schema can be saved in JSON file (Save field schema button) and can be used for modifying some feature class or table later (Load field schema button).
Using compact view of Schema
dialog window ( button) you can
quickly reorder fields moving them to the needed location. You can
also change simple field properties in the compact view.
Each field can be viewed and its properties can be redefined if needed (Details button).
Field properties:
-
For numeric fields following properties can be set or modified:
Precision (for Long Integer, Float and Double), Scale (for Float and Double), Allow NULL values, Default and Error values -
For text fields following properties can be set or modified:
Length, Case (As is, ALL UPPER CASE, all lower case, Word Capitalization, String capitalization), Allow NULL values, Default and Error values -
For date fields following properties can be set or modified:
Allow NULL values, Default and Error values -
For geometry field following properties can be set or modified:
Geometry type, Coordinate system, Z and M values, Allow NULL values -
For BLOB field following property can be set or modified:
Length.
Notes:
-
Coordinate system parameter only shows the output spatial reference, it may be redefined in the main tool window.
-
Precision and Scale numeric parameters are only available for output datasets in SDE.
-
Raster, BLOB, GUID, Global ID are not supported for output shapefiles and standalone tables .dbf.
Defining output fields
Output fields can be defined as:
-
New
- the output field will be empty or will be filled by default values. -
Field
- the output field will be filled by the values of the selected input dataset field.
In the Schema section of main tool dialog window fields are marked as white (will be empty); light green (source Field specified).
You can also filter fields by name (alias) or type and sort them using arrow buttons or mouse (drag the field name and drop it to a new location).
Note
The output field definition (New, Field) is available only in full mode of Schema dialog window.
Importing fields
New fields can be added to the output table from another table or feature class. The necessary fields may be taken from fields list (List of fields button) or you can type them manually in the entry field. The selected fields will be added to the Schema section of main tool window. If the input dataset has a field with the same name and the type defined for the imported field, the field of the output dataset will be defined as Field and filled with the input field values by default, otherwise the field of the output dataset will be defined as New.
Note:
The Shape field will be imported only if there is no Geometry type field
in the current scheme.
Loading field schema
You can specify the field schema loading one from the previously saved JSON file (Load field schema button). This option allows getting several datasets with the same field schema. You can also redefine the field parameters and save the changed schema in the JSON file (Save field schema button).
Schema file contains not only field order and properties, but also how they should be filled in the output table. If a field in the schema file is defined as Field, the name of the field to fill is also saved in the file. Then if the input dataset has a field with the same name and the type defined for the field from the schema file, the field of the output dataset will be defined as Field and filled with the input field values by default, otherwise the field of the output dataset will be defined as New.
Loaded field schema replaces the current field schema.
Note:
If input dataset is a feature class, input geometry type won't be replaced
from the JSON schema. If field schema with Shape field is loaded for input
table, output features will have null geometry.
Specifying output dataset options
By default, the output spatial reference is the coordinate system of the input Shape field, but you can redefine it. As well, you can select an alias and a configuration keyword for the output datasets created in geodatabases.
Notes:
-
If the previously redefined coordinate system has been deleted and the output Shape field is not modified, the output feature class will keep the input spatial reference;
-
If the previously redefined coordinate system has been deleted and the output Shape field is defined as New, the output spatial reference will become undefined.
Specifying data options
You can copy attachments, domains and subtypes to the output dataset, if there are any in the input dataset and these options are selected.
Notes:
-
The option of copying subtypes includes copying subtype domains.
-
Only those domains and subtypes can be copied that are used in the input fields and these input fields are copied to the output dataset using the Field method.
-
Copying attachments is disabled with ArcGIS Pro Basic license.