Create Field Group (Data Management)

Summary

Create a field group for a feature class or table. Field groups are used when creating contingent values.

Learn more about contingent values

Usage

  • 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.

  • Field groups are compatible with ArcGIS Pro 2.3 and later geodatabases. If your geodatabase is an earlier version, you must upgrade your geodatabase to 2.3 or later.

  • Note:

    Once a field group is added to a dataset, the dataset version is set to ArcGIS Pro 2.3. This means that the dataset can no longer be used in ArcMap.

Syntax

CreateFieldGroup(target_table, name, fields, {is_restrictive})
ParameterExplanationData Type
target_table

The input geodatabase table or feature class in which the field group will be created.

Table View
name

The name of the field group that will be created. This name must be unique to the feature class or table that will contain the field group.

String
fields
[fields,...]

The names of the fields in the field group.

String
is_restrictive
(Optional)

Specifies if the field group is restrictive. This parameter allows you to control the editing experience when using contingent values.

  • RESTRICTThe field group is restrictive. Values entered on a field in the field group are restricted to those specified as contingent values. This is the default.
  • DO_NOT_RESTRICTThe field group is not restrictive. Values can be committed to a field in a field group even if they are not specified as contingent values.
Boolean

Derived Output

NameExplanationData Type
out_table

The updated input table containing the field group.

Table View

Code sample

CreateFieldGroup example (Python window)

Create a new field group.

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

Environments

Licensing information

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

Related topics