Generate Contingent Values (Data Management)

Summary

Generates contingent values from an existing dataset using either the data values in the table or the domain values assigned to the fields. The tool creates two .csv files: one for field groups and one for contingent values.

Usage

  • The input table must reside in a workspace that supports contingent values.

  • Field groups must be configured on the input table for the tool to run successfully.

  • When the Mode parameter is set to Schema, a contingent value will be generated for every possible combination of domains assigned in the field group. This can result in an large number of contingent values.

  • When a field in a field group has no domain assigned, the tool will generate a contingent value of ANY for that field. If the field is nullable, a NULL contingent value will also be generated.

Parameters

LabelExplanationData Type
Input Table

The table whose data or schema will be used to generate the contingent values.

Table View
Field Groups File

The output .csv file containing field group information.

File
Contingent Values File

The output .csv file containing contingent value information.

File
Mode
(Optional)

Specifies the method that will be used to generate contingent values.

  • Data The values in the input table will be used to generate valid contingent values. This is the default.
  • Schema The product of the coded values of all domains assigned to the field group's fields will be used to generate all possible contingent value combinations.
String
Field Groups
(Optional)

The field groups for which contingent values will be generated. If no value is provided, all field groups will be used.

String

arcpy.management.GenerateContingentValues(in_table, field_groups_file, contingent_values_file, {mode}, {field_groups})
NameExplanationData Type
in_table

The table whose data or schema will be used to generate the contingent values.

Table View
field_groups_file

The output .csv file containing field group information.

File
contingent_values_file

The output .csv file containing contingent value information.

File
mode
(Optional)

Specifies the method that will be used to generate contingent values.

  • DATA The values in the input table will be used to generate valid contingent values. This is the default.
  • SCHEMA The product of the coded values of all domains assigned to the field group's fields will be used to generate all possible contingent value combinations.
String
field_groups
[field_groups,...]
(Optional)

The field groups for which contingent values will be generated. If no value is provided, all field groups will be used.

String

Code sample

GenerateContingentValues example (Python window)

The following Python window script demonstrates how to use the GenerateContingentValues function in immediate mode.

import arcpy
arcpy.management.GenerateContingentValues(
    'C:\\location\\gdb.gdb\\table_1', 'c:\\temp\\fg.csv', 'c:\\temp\\cv.csv',
    ['field_group_1', 'field_group_3'], 'DATA')

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics