ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data Namespace / Table Class / GetContingentValues Method
The input row buffer.
The field to get contingent values for.
Example Version

GetContingentValues Method (Table)
Gets the possible contingent values for the given field name based on the values of the row buffer.
Syntax

Parameters

rowBuffer
The input row buffer.
fieldName
The field to get contingent values for.

Return Value

Exceptions
ExceptionDescription
The table does not contain the input field name.
rowBuffer and/or fieldName is null.
A geodatabase-related exception has occurred.
Example
Get possible contingent values
public void GetPossibleContingentValues(FeatureClass parcels, string zoningFieldName = "Zone")
{
    using (RowBuffer rowBuffer = parcels.CreateRowBuffer())
    {
        IReadOnlyDictionary<FieldGroup, IReadOnlyList<ContingentValue>> possibleZonings = parcels.GetContingentValues(rowBuffer, zoningFieldName);
        IEnumerable<FieldGroup> possibleFieldGroups = possibleZonings.Keys;
        foreach (FieldGroup possibleFieldGroup in possibleFieldGroups)
        {
            IReadOnlyList<ContingentValue> possibleZoningValues = possibleZonings[possibleFieldGroup];
            foreach (ContingentValue possibleZoningValue in possibleZoningValues)
            {
                switch (possibleZoningValue)
                {
                    case ContingentCodedValue codedValue:
                        string codedValueDomainName = codedValue.Name;
                        object codedValueDomainValue = codedValue.CodedValue;
                        break;
                    case ContingentRangeValue rangeValue:
                        object rangeDomainMaxValue = rangeValue.Max;
                        object rangeDomainMinValue = rangeValue.Min;
                        break;
                    case ContingentAnyValue contingentAnyValue:
                        // Any value type
                        break;
                    case ContingentNullValue contingentNullValue:
                        // Null value
                        break;
                }
            }
        }
    }
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also