Export Contingent Values (Data Management)

Summary

Exports field groups and contingent values to a .csv file.

Usage

  • This tool can be used in conjunction with the Import Contingent Values tool.

  • The field groups .csv file includes the NAME, IS_RESTRICTIVE, and FIELD columns. The FIELD column name will be incremented as needed to include all fields in the field group, for example, FIELD1, FIELD2, FIELD3, and so on.

    Field groups .csv columns

    ColumnDescriptionExample

    NAME

    The field group name

    AnimalCategories

    IS_RESTRICTIVE

    Specifies whether the field group is restrictive

    TRUE

    FIELD1

    The name of the field

    category

  • The contingent values .csv file includes the following columns: CAV_ID, IS_RETIRED, FIELD_GROUP, SUBTYPE, SUBTYPE_NAME, CV_TYPE, CV_VALUE, and DESCRIPTION.

    Contingent values .csv columns

    ColumnDescriptionExample

    CAV_ID

    The ID of the contingent value.

    1

    IS_RETIRED

    A Boolean value defining whether the contingent value is retired.

    False

    FIELD_GROUP

    The name of the field group to which the contingent value corresponds.

    AnimalCategories

    SUBTYPE

    If the dataset has a subtype and the subtype is used in the contingent value definition, this is the subtype code to which the rule is applied.

    2

    SUBTYPE_NAME

    If the dataset has a subtype and the subtype is used in the contingent value definition, this is the text description of the subtype code.

    Cold blooded

    CV_TYPE1

    The type of contingent value. The type value is stored as an integer as follows:

    • 1—Any
    • 2—Null
    • 3—Coded Value
    • 4—Range

    3

    CV_VALUE1

    The specific field value. If the type is any or null, the value in the .csv file is empty.

    1

    DESCRIPTION1

    If the contingent value type is a coded value, this is the text description of the coded value.

    Fish

Syntax

arcpy.management.ExportContingentValues(target_table, field_groups_file, contingent_values_file)
ParameterExplanationData Type
target_table

The input geodatabase table or feature class from which the field groups and contingent values will be exported.

Table View
field_groups_file

The location and name of the output .csv file that will be created with specific column names containing information about the field groups of the target table.

File
contingent_values_file

The location and name of the output .csv file that will be created with specific column names containing information about the contingent values of the target table.

File

Code sample

ExportContingentValues example (Python window)

Export the field groups and contingent values from a feature class named GasPipes.

import arcpy
arcpy.ExportContingentValues_management("C:\\MyProject\\myConn.sde\\pro.USER1.Animals",
                                        "C:\\MyProject\\MyFieldGroups.csv",
                                        "C:\\MyProject\\MyContingentValues.csv")

Environments

Licensing information

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

Related topics