ChoiceMetadata

Metadata for a Dataverse single-select choice (option set / picklist) column, including the available choice values.

ChoiceMetadata Class

Properties

Name
Type
Default
Description
ChoiceLogicalNamestring
The logical name of the choice (option set) definition in Dataverse.
ChoicesList<ChoiceValueMetadata>
The list of available choice values with their display names.
ColumnNamestring
The logical name of the column in Dataverse (e.g. 'firstname', 'emailaddress1').
ColumnTypeColumnType
Choice
Returns Choice.
DerivedFromColumnstring?
The logical name of the column this one takes its value from, or null when the column stands on its own. Dataverse creates companion columns that republish another column's value under a second name: the …name / …yominame partners of a lookup, the label partner of a choice, and the base-currency twin of every money column, which carries the same amount converted to the organization's base currency. The platform reports the link on two different properties — AttributeOf for the companions, CalculationOf for the base-currency twin — and this is both of them, resolved to one. Column security reads it: withholding a column has to withhold whatever republishes it, or denying creditlimit still ships creditlimit_base with the real amount in it. See TableMetadata.ResolveValueSourceColumn, which follows the chain to its root.
Descriptionstring?
The localized description of the column, or null if no description is configured.
DisplayNamestring
The localized display name of the column as configured in Dataverse.
IsGlobalbool
False
Indicates whether this choice is a global option set shared across multiple tables.
IsValidForCreatebool
False
Indicates whether this column can be set when creating a new record.
IsValidForUpdatebool
False
Indicates whether this column can be modified when updating an existing record.
RequiredLevelRequiredLevel
None
The required level of the column (None, SystemRequired, ApplicationRequired, or Recommended).
SourceTypeColumnSourceType
Simple
Whether the column is stored as it was written, or computed by the platform from other columns. See Models.ColumnSourceType — a computed column does not report which columns feed it, so ColumnMetadataBase.DerivedFromColumn is null for one even though its value may well be derived.
Name: ChoiceLogicalName
Type: string
Description: The logical name of the choice (option set) definition in Dataverse.
Name: Choices
Type: List<ChoiceValueMetadata>
Description: The list of available choice values with their display names.
Name: ColumnName
Type: string
Description: The logical name of the column in Dataverse (e.g. 'firstname', 'emailaddress1').
Name: ColumnType
Type: ColumnType
Default: Choice
Description: Returns Choice.
Name: DerivedFromColumn
Type: string?
Description: The logical name of the column this one takes its value from, or null when the column stands on its own. Dataverse creates companion columns that republish another column's value under a second name: the …name / …yominame partners of a lookup, the label partner of a choice, and the base-currency twin of every money column, which carries the same amount converted to the organization's base currency. The platform reports the link on two different properties — AttributeOf for the companions, CalculationOf for the base-currency twin — and this is both of them, resolved to one. Column security reads it: withholding a column has to withhold whatever republishes it, or denying creditlimit still ships creditlimit_base with the real amount in it. See TableMetadata.ResolveValueSourceColumn, which follows the chain to its root.
Name: Description
Type: string?
Description: The localized description of the column, or null if no description is configured.
Name: DisplayName
Type: string
Description: The localized display name of the column as configured in Dataverse.
Name: IsGlobal
Type: bool
Default: False
Description: Indicates whether this choice is a global option set shared across multiple tables.
Name: IsValidForCreate
Type: bool
Default: False
Description: Indicates whether this column can be set when creating a new record.
Name: IsValidForUpdate
Type: bool
Default: False
Description: Indicates whether this column can be modified when updating an existing record.
Name: RequiredLevel
Type: RequiredLevel
Default: None
Description: The required level of the column (None, SystemRequired, ApplicationRequired, or Recommended).
Name: SourceType
Type: ColumnSourceType
Default: Simple
Description: Whether the column is stored as it was written, or computed by the platform from other columns. See Models.ColumnSourceType — a computed column does not report which columns feed it, so ColumnMetadataBase.DerivedFromColumn is null for one even though its value may well be derived.

ChoiceValueMetadata Class

Properties

Name
Type
Default
Description
Colorstring?
The colour assigned to the option in Dataverse, as a CSS hex colour (#rgb, #rgba, #rrggbb or #rrggbbaa), or null when none is set. A value that isn't a hex colour is dropped on the server, so it is safe to put into a style.
DisplayNamestring
The localized display name of the choice option.
Valueint
0
The integer value of the choice option.
Name: Color
Type: string?
Description: The colour assigned to the option in Dataverse, as a CSS hex colour (#rgb, #rgba, #rrggbb or #rrggbbaa), or null when none is set. A value that isn't a hex colour is dropped on the server, so it is safe to put into a style.
Name: DisplayName
Type: string
Description: The localized display name of the choice option.
Name: Value
Type: int
Default: 0
Description: The integer value of the choice option.