Summary
Create a field group for a feature class or table. Field groups are used when creating 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})
Parameter | Explanation | Data 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.
| Boolean |
Derived Output
Name | Explanation | Data Type |
out_table | The updated input table containing the field group. | Table View |
Code sample
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