CreateContingentValues

Title  Create Contingent Values

Description

Creates contingent values from schema or data.

Usage

          
The target table must have at least one field field group.
Schema mode can create very large CSVs depending on the number of field groups and coded value domains. The result should be edited before importing.

License

Basic

Syntax

CreateContingentValues (target_table, field_groups_file, contingent_values_file, mode)

Parameter Explanation Data Type
target_table Dialog Reference

The table with field groups.

GPComposite
field_groups_file Dialog Reference

The output .csv file containing information about the field groups.

DEFile
contingent_values_file Dialog Reference

The output .csv file containing information about the contingent values.

DEFile
mode Dialog Reference

Defines from where the contingent values will be generated:

  • Use schema - Create contingent values from all combinations of domains. This is the default.
  • Use data - Create contingent values from existing rows in the table.

GPString

Code Samples

CreateContingentValues example 1 (Python window)

Creates contingent values from schema or data.

import arcpy

arcpy.udms.CreateContingentValues(
    "D:/data/AssetPackage.gdb/UtilityNetwork/UNDevice",
    "D:/data/UNDevice_FieldGroups.csv",
    "D:/data/UNDevice_ContingentValues.csv",
    "DATA",
)

CreateContingentValues example 2 (stand-alone script)

Creates contingent values from schema or data.

import arcpy

arcpy.udms.CreateContingentValues(
    target_table="D:/data/AssetPackage.gdb/UtilityNetwork/UNDevice",
    field_groups_file="D:/data/UNDevice_FieldGroups.csv",
    contingent_values_file="D:/data/UNDevice_ContingentValues.csv",
    mode="DATA",
)