An appropriate list of values for a Field. More...
Public Functions Detailed DescriptionA coded value domain consists of a collection of coded values that are saved in the dataset. When a user is editing data, you can present the list of coded values for the fields (attributes) they edit, or validate their input values against the coded value domain before changes are saved. This ensures that the user maintains data integrity by only applying values that are in the codedValues.
You can create a coded value domain in a mobile geodatabase, if the mobile geodatabase was created in ArcGIS Pro or using Geodatabase::createAsync(const QString&, QObject*). To create a CodedValueDomain, you can create a CodedValueDomainDescription that has a collection of CodedValueDescription, by using CodedValueDomainDescription::CodedValueDomainDescription(const QString&, Esri::ArcGISRuntime::FieldType, const QList<Esri::ArcGISRuntime::CodedValueDescription*>&, QObject*). Next, you create the CodedValueDomain by calling Geodatabase::createDomainAsync(Esri::ArcGISRuntime::DomainDescription*) with the CodedValueDomainDescription.
Example:
Obtain coded values from a field's CodedValueDomain:
// Create service feature table auto* featureTable = new ServiceFeatureTable(serviceUrl1, this); // Connect to loadStatusChanged signal to access fields once loaded connect(featureTable, &ServiceFeatureTable::loadStatusChanged, [featureTable](LoadStatus loadStatus) { if (loadStatus == LoadStatus::Loaded) { Field field = featureTable->field("PRIMCAUSE"); CodedValueDomain codedValueDomain = static_cast<CodedValueDomain>(field.domain()); QString codedValue1 = codedValueDomain.codedValues().at(0).name(); QString codedValue2 = codedValueDomain.codedValues().at(1).name(); QString codedValue3 = codedValueDomain.codedValues().at(2).name(); QString codedValue4 = codedValueDomain.codedValues().at(3).name(); } });
Relevant samples:
See also CodedValue.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4