Skip To Content

Alter Field Group

Summary

Alters the properties of a field group.

Usage

  • Deleting a field group will remove the contingent values that are associated with it. This tool allows you to modify the field group without removing the associated contingent values.

  • Modifying the fields that participate in the field group can affect the contingent values that are dependent on them as described in the following table:

    OperationOutcome

    Remove a field

    The contingent values that are associated with the removed field will also be removed.

    Add a field

    The contingent values associated with the field group will have the new field added to the contingent value with a field value type of ANY.

  • Fields used to create a field group cannot be system-maintained fields such as ObjectID or Shape or the subtype field.

  • If your data is stored in an enterprise geodatabase, you must be connected as the data owner to use this tool.

Syntax

AlterFieldGroup_management (target_table, name, {new_name}, {fields})
ParameterExplanationData Type
target_table

The table containing the field group to be altered.

Table View
name

The name of the field group to be altered.

String
new_name
(Optional)

The new, unique name for the field group.

String
fields
[fields,...]
(Optional)

The fields that participate in the field group. To modify the fields, enter new field names. Provided values will replace, not append, the current list of fields that participates in the field group. If no values are provided, the fields will not be altered.

String

Derived Output

NameExplanationData Type
out_table

The input target table with the altered field group.

Table View

Code sample

AlterFieldGroup example (Python window)

Alter the properties of a field group by renaming the field group and replacing the current field group fields with Field1 and Field2.

import arcpy
arcpy.AlterFieldGroup_management("C:\\MyProject\\myConn.sde\\mygdb.USER1.myFC",
                                 "MyFieldGroup", "MyNewFieldGroupName",
                                 ["Field1", "Field3"])

Environments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics