Contingent values, sometimes called contingent attribute values, are a data design feature that allows you to make values in one field dependent on values in another field. Attribute domains allow you to restrict the valid entries in a field to a set list or range of values. Contingent values extend this model by making your choice for a value on one field, further constraining the domain values that can be placed on another field. In this way, contingent values enforce data integrity by applying additional constraints to reduce the number of valid field inputs. This can be useful when modeling real-world parts and assets in a GIS, particularly for utility companies. This can also be useful for creating decision trees or survey questions when making a choice that will determine the next set of valid choices.
Caution:
Creating contingent values on a table or feature class makes it incompatible with ArcMap and releases earlier than ArcGIS Pro 2.3 and ArcGIS Enterprise 10.7.x. See Client and geodatabase compatibility for more information about available functionality when using mixed client and geodatabase releases.
A common example of an application of contingent values is buying a vehicle.
The decision tree may look like this: Pick a Car Brand > Car Model > Trim Level > Color
First, you choose the car brand, for example, Honda.
Based on that brand, several car models are available.
For Honda, these can be Pilot, CR-V, Accord, and Civic.
For Toyota, a different list of car models is available.
Then, based on the car model you choose, several trim levels are available.
For a Honda Pilot, these can be LX, EX-L, Sport, and Touring.
For the trim level you choose, several colors are available, such as red, blue, black, and white.
Each choice in the decision tree presents a list of options contingent on your previous choice. Choosing a different car brand will result in various car models being available. The car model you choose dictates which trim levels are available, and each trim level may have a different set of color options. Depending on which option you choose at each stage, your choices can result in a Honda > Pilot > EX-L > White, or a Toyota > 4Runner > TRD Sport > Inferno.
Contingent values allow you to set up these field dependencies in your data in which your choice for a value in one field defines and restricts the list of valid values for another field.
For a real-world GIS example, consider the StructureJunction feature class in the utility network asset package. This point feature class for structure junctions has subtypes for assets such as power poles, manholes, platforms, and so on.
For the Pole subtype, domains have been applied to three fields. The domains constrain the values placed on each field to a list of valid values. For example, a pole can be of pole class 1, 2, or 3; its material can be fiberglass, wood, or steel; and its height can be 30 feet, 35 feet, 40 feet, 45 feet, and so on.
You can use contingent values to further constrain the valid values for this set of fields. For example, using contingent values, you can define a class 1 pole as being made only of fiberglass and restricted to 30, 35, 40, or 45 feet in height.
Consider the contingencies that you want between field values for the Pole subtype. For this group of fields (class, material, and height), the set of contingencies can be as follows:
Field | Contingent values | Contingent values | Contingent values |
---|---|---|---|
Class | 1 | 2 | 3 |
Material | Fiberglass | Wood | Steel |
Height | 30, 35, 40, 45 | 30, 35, 40, 45 | 50, 55, 60, 65 |
After these contingent values are created, if you place a new pole feature or modify an existing one and designate it a class 1 power pole, the set of values you can put on the Material field will be constrained to Fiberglass. Likewise, the valid values for the height of a class 1 fiberglass pole are constrained to 30, 35, 40, or 45.
Building contingent values like this in your data allows you to further constrain the valid values for sets of fields and more efficiently manage the validity and integrity of your data.