Skip To Content ArcGIS for Developers Sign In Dashboard

ArcGISFeatureTable Class

class Esri::ArcGISRuntime::ArcGISFeatureTable

A feature table created from an ArcGIS feature source. More...

Header: #include <ArcGISFeatureTable>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::FeatureTable
Inherited By:

Esri::ArcGISRuntime::GeodatabaseFeatureTable and Esri::ArcGISRuntime::ServiceFeatureTable

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

virtual ~ArcGISFeatureTable() override
Esri::ArcGISRuntime::TaskWatcher addedFeatures()
Esri::ArcGISRuntime::TaskWatcher addedFeaturesCount()
Esri::ArcGISRuntime::ArcGISFeature *createFeatureWithSubtype(const Esri::ArcGISRuntime::FeatureSubtype &featureSubtype, QObject *parent = nullptr) const
Esri::ArcGISRuntime::ArcGISFeature *createFeatureWithSubtype(const Esri::ArcGISRuntime::FeatureSubtype &featureSubtype, const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr) const
Esri::ArcGISRuntime::ArcGISFeature *createFeatureWithTemplate(const Esri::ArcGISRuntime::FeatureTemplate &featureTemplate, QObject *parent = nullptr) const
Esri::ArcGISRuntime::ArcGISFeature *createFeatureWithTemplate(const Esri::ArcGISRuntime::FeatureTemplate &featureTemplate, const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr) const
Esri::ArcGISRuntime::ArcGISFeature *createFeatureWithType(const Esri::ArcGISRuntime::FeatureType &featureType, QObject *parent = nullptr) const
Esri::ArcGISRuntime::ArcGISFeature *createFeatureWithType(const Esri::ArcGISRuntime::FeatureType &featureType, const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr) const
QVariant defaultSubtypeCode() const
Esri::ArcGISRuntime::TaskWatcher deletedFeatures()
Esri::ArcGISRuntime::TaskWatcher deletedFeaturesCount()
QList<Esri::ArcGISRuntime::Field> editableAttributeFields() const
QList<Esri::ArcGISRuntime::FeatureSubtype> featureSubtypes() const
Esri::ArcGISRuntime::FeatureTemplate featureTemplate(const QString &name) const
QList<Esri::ArcGISRuntime::FeatureTemplate> featureTemplates() const
Esri::ArcGISRuntime::FeatureType featureType(const QString &name) const
QList<Esri::ArcGISRuntime::FeatureType> featureTypes() const
QString globalIdField() const
bool hasAttachments() const
bool hasLocalEdits() const
bool isUseAdvancedSymbology() const
Esri::ArcGISRuntime::ArcGISFeatureLayerInfo layerInfo() const
QString objectIdField() const
Esri::ArcGISRuntime::TaskWatcher queryRelatedFeatureCount(Esri::ArcGISRuntime::ArcGISFeature *feature)
Esri::ArcGISRuntime::TaskWatcher queryRelatedFeatureCount(Esri::ArcGISRuntime::ArcGISFeature *feature, const Esri::ArcGISRuntime::RelatedQueryParameters &relatedQueryParameters)
Esri::ArcGISRuntime::TaskWatcher queryRelatedFeatures(Esri::ArcGISRuntime::ArcGISFeature *feature)
Esri::ArcGISRuntime::TaskWatcher queryRelatedFeatures(Esri::ArcGISRuntime::ArcGISFeature *feature, const Esri::ArcGISRuntime::RelatedQueryParameters &relatedQueryParameters)
QList<Esri::ArcGISRuntime::ArcGISFeatureTable *> relatedTables(const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo) const
QList<Esri::ArcGISRuntime::ArcGISFeatureTable *> relatedTables() const
qint64 serviceLayerId() const
void setUseAdvancedSymbology(bool advancedSymbology)
QString subtypeField() const
QString typeIdField() const
QJsonObject unknownJson() const
QJsonObject unsupportedJson() const
Esri::ArcGISRuntime::TaskWatcher updatedFeatures()
Esri::ArcGISRuntime::TaskWatcher updatedFeaturesCount()
Esri::ArcGISRuntime::TaskWatcher validateRelationshipConstraints(Esri::ArcGISRuntime::ArcGISFeature *feature)

Signals

void addedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)
void addedFeaturesCountCompleted(QUuid taskId, qint64 count)
void deletedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)
void deletedFeaturesCountCompleted(QUuid taskId, qint64 count)
void queryRelatedFeatureCountCompleted(QUuid taskId, quint64 count)
void queryRelatedFeaturesCompleted(QUuid taskId, QList<Esri::ArcGISRuntime::RelatedFeatureQueryResult *> relatedFeatureQueryResults)
void updatedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)
void updatedFeaturesCountCompleted(QUuid taskId, qint64 count)
void validateRelationshipConstraintsCompleted(QUuid taskId, Esri::ArcGISRuntime::RelationshipConstraintViolationType relationshipConstraintViolationType)

Detailed Description

Subclasses of this class represent a feature set from a specific type of ArcGIS source such as a feature service or a geodatabase. The features in the set might or might not include geometry. You can query the ArcGISFeatureTable using attribute or spatial criteria. If permitted, you can edit the features. Edits are tracked, so you can later retrieve a list of your edits. If the feature set contains geographic features, you can display them on a map using a FeatureLayer.

An ArcGISFeatureTable may have FeatureTemplates, FeatureTypes, and support edit capabilities. These are defined by the table's service definition. An ArcGISFeatureTable may have editable attribute fields.

ArcGISFeatureTables from the same data source can be related to one another. RelationshipInfo defines relationships between tables. A relationship's cardinality may be one-to-one (1:1), one-to-many (1:n), or many-to-many (m:n), depending on the capabilities of the data source. If a table has relationships, you can find related tables, query for related features, and edit them.

To query or edit using related tables, all the tables participating in the relationship must be loaded into the same Map. Otherwise, the query will not return results and the edits cannot be performed. RelatedQueryParameters defines queries on related tables.

Member Function Documentation

[signal] void ArcGISFeatureTable::addedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

Signal emitted after a task started by addedFeatures has completed.

  • taskId - The task ID for the asynchronous operation.
  • featureQueryResult - The features that have been added to the table.

The returned FeatureQueryResult object has the ArcGISFeatureTable as its parent.

See also Returned QObjects Parenting.

[signal] void ArcGISFeatureTable::addedFeaturesCountCompleted(QUuid taskId, qint64 count)

Signal emitted after a task started by addedFeaturesCount has completed.

  • taskId - The task ID for the asynchronous operation.
  • count - The count of features that have been added to the table.

[signal] void ArcGISFeatureTable::deletedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

Signal emitted after a task started by deletedFeatures has completed.

  • taskId - The task ID for the asynchronous operation.
  • featureQueryResult - The result of features that have been deleted from the table.

The returned FeatureQueryResult objects have the ArcGISFeatureTable as their parent.

See also Returned QObjects Parenting.

[signal] void ArcGISFeatureTable::deletedFeaturesCountCompleted(QUuid taskId, qint64 count)

Signal emitted after a task started by deletedFeaturesCount has completed.

  • taskId - The task ID for the asynchronous operation.
  • count - The count of features that have been deleted from the table.

[signal] void ArcGISFeatureTable::queryRelatedFeatureCountCompleted(QUuid taskId, quint64 count)

Signal emitted after a task started by queryRelatedFeatureCount has completed.

  • taskId - The task ID for the asynchronous operation.
  • count - The count of related features.

This function was introduced in Esri::ArcGISRuntime 100.3.

[signal] void ArcGISFeatureTable::queryRelatedFeaturesCompleted(QUuid taskId, QList<Esri::ArcGISRuntime::RelatedFeatureQueryResult *> relatedFeatureQueryResults)

Signal emitted after a task started by queryRelatedFeatures has completed.

  • taskId - The task ID for the asynchronous operation.
  • relatedFeatureQueryResults - The list ofRelatedFeatureQueryResult, one per related table containing features related to the queried feature.

The returned RelatedFeatureQueryResult objects have the ArcGISFeatureTable as their parent.

This function was introduced in Esri::ArcGISRuntime 100.1.

See also Returned QObjects Parenting.

[signal] void ArcGISFeatureTable::updatedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

Signal emitted after a task started by updatedFeatures has completed.

  • taskId - The task ID for the asynchronous operation.
  • featureQueryResult - A result of features that have been updated in the table.

The returned FeatureQueryResult objects have the ArcGISFeatureTable as their parent.

See also Returned QObjects Parenting.

[signal] void ArcGISFeatureTable::updatedFeaturesCountCompleted(QUuid taskId, qint64 count)

Signal emitted after a task started by updatedFeaturesCount has completed.

  • taskId - The task ID for the asynchronous operation.
  • count - The count of features that have been updated in the table.

[signal] void ArcGISFeatureTable::validateRelationshipConstraintsCompleted(QUuid taskId, Esri::ArcGISRuntime::RelationshipConstraintViolationType relationshipConstraintViolationType)

Signal emitted after a task started by validateRelationshipConstraints has completed.

  • taskId - The task ID for the asynchronous operation.
  • relationshipConstraintViolationType - The type of violation, such as cardinality.

[override virtual] ArcGISFeatureTable::~ArcGISFeatureTable()

Destructor.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::addedFeatures()

Requests a collection of features that have been added to the local dataset but not yet added to the original source dataset.

Returns a TaskWatcher for the asynchronous operation.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::addedFeaturesCount()

Requests a count of features added to the local dataset but not yet added to the original source dataset.

Returns a TaskWatcher for the asynchronous operation.

Esri::ArcGISRuntime::ArcGISFeature *ArcGISFeatureTable::createFeatureWithSubtype(const Esri::ArcGISRuntime::FeatureSubtype &featureSubtype, QObject *parent = nullptr) const

Creates and returns a new feature based on the specified featureSubtype, with an optional parent.

Note, the new feature is only available in memory at this point, it is not committed to the dataset and will need to be explicitly added.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also FeatureTable::addFeature.

Esri::ArcGISRuntime::ArcGISFeature *ArcGISFeatureTable::createFeatureWithSubtype(const Esri::ArcGISRuntime::FeatureSubtype &featureSubtype, const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr) const

Creates and returns a new feature based on the specified featureSubtype and geometry with an optional parent.

Note, the new feature is only available in memory at this point, it is not committed to the dataset and will need to be explicitly added.

This function was introduced in Esri::ArcGISRuntime 100.3.

See also FeatureTable::addFeature.

Esri::ArcGISRuntime::ArcGISFeature *ArcGISFeatureTable::createFeatureWithTemplate(const Esri::ArcGISRuntime::FeatureTemplate &featureTemplate, QObject *parent = nullptr) const

Creates and returns a new feature based on the given featureTemplate, with an optional parent.

The new feature is only available in memory at this point, it is not committed to the dataset and will need to be explicitly added.

See also FeatureTable::addFeature.

Esri::ArcGISRuntime::ArcGISFeature *ArcGISFeatureTable::createFeatureWithTemplate(const Esri::ArcGISRuntime::FeatureTemplate &featureTemplate, const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr) const

Creates and returns a new feature based on the specified featureTemplate and geometry, with an optional parent.

The new feature is only available in memory at this point, it is not committed to the dataset and will need to be explicitly added.

See also FeatureTable::addFeature.

Esri::ArcGISRuntime::ArcGISFeature *ArcGISFeatureTable::createFeatureWithType(const Esri::ArcGISRuntime::FeatureType &featureType, QObject *parent = nullptr) const

Creates and returns a new feature based on the specified featureType, with an optional parent.

Note, the new feature is only available in memory at this point, it is not committed to the dataset and will need to be explicitly added.

See also FeatureTable::addFeature.

Esri::ArcGISRuntime::ArcGISFeature *ArcGISFeatureTable::createFeatureWithType(const Esri::ArcGISRuntime::FeatureType &featureType, const Esri::ArcGISRuntime::Geometry &geometry, QObject *parent = nullptr) const

Creates and returns a new feature based on the specified featureType and geometry with an optional parent.

Note, the new feature is only available in memory at this point, it is not committed to the dataset and will need to be explicitly added.

See also FeatureTable::addFeature.

QVariant ArcGISFeatureTable::defaultSubtypeCode() const

Returns the table's default subtype code.

This function was introduced in Esri::ArcGISRuntime 100.3.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::deletedFeatures()

Requests a collection of features deleted from the local dataset but not yet deleted from the original source dataset.

Returns a TaskWatcher for the asynchronous operation.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::deletedFeaturesCount()

Requests a count of features deleted from the local dataset but not yet deleted from the original source dataset.

Returns a TaskWatcher for the asynchronous operation.

QList<Esri::ArcGISRuntime::Field> ArcGISFeatureTable::editableAttributeFields() const

Returns a list of Field objects representing the subset of fields (columns) in the dataset that are editable.

QList<Esri::ArcGISRuntime::FeatureSubtype> ArcGISFeatureTable::featureSubtypes() const

Returns a list of FeatureSubtype objects describing the subtypes of the layer.

This list is included for layers that have subtypes. The domains in the types list will match the domains in the subtype list for layers that have a unique value renderer based on the subtype column.

This function was introduced in Esri::ArcGISRuntime 100.3.

Esri::ArcGISRuntime::FeatureTemplate ArcGISFeatureTable::featureTemplate(const QString &name) const

Returns a feature template given its name.

QList<Esri::ArcGISRuntime::FeatureTemplate> ArcGISFeatureTable::featureTemplates() const

Returns a list of feature templates for this ArcGISFeatureTable.

A feature template contains all the information required to create a feature, including the attributes a feature is created with. An ArcGISFeatureTable may have one or more feature templates that correspond to different types of features that you may create in the ArcGISFeatureTable.

You can get feature templates if this ArcGISFeatureTable does not contain feature subtypes.

Esri::ArcGISRuntime::FeatureType ArcGISFeatureTable::featureType(const QString &name) const

Returns a feature type given its name.

QList<Esri::ArcGISRuntime::FeatureType> ArcGISFeatureTable::featureTypes() const

Returns a list of FeatureType objects representing feature subtypes in the layer.

For example, a roads layer may contain two feature subtypes: highways and streets.

QString ArcGISFeatureTable::globalIdField() const

Returns the name of field which contains the GLOBALID for each feature.

bool ArcGISFeatureTable::hasAttachments() const

Returns true if features may have attachments.

bool ArcGISFeatureTable::hasLocalEdits() const

Returns whether the feature table has local edits.

For Esri::ArcGISRuntime::ServiceFeatureTable, local edits are edits that have not yet been applied to the feature service. For Esri::ArcGISRuntime::GeodatabaseFeatureTable, local edits are edits that have been made since the last acknowledged upload.

When a table is not change tracked, it will emit a Error with an Error::code of 3071 (Geodatabase change tracking not enabled).

This function was introduced in Esri::ArcGISRuntime 100.9.

bool ArcGISFeatureTable::isUseAdvancedSymbology() const

Returns whether the dataset should be visualized using advanced CIM symbology from the service.

See also setUseAdvancedSymbology.

Esri::ArcGISRuntime::ArcGISFeatureLayerInfo ArcGISFeatureTable::layerInfo() const

Returns the service information associated with the feature layer.

Note, feature layer information can only be obtained after the table is loaded.

QString ArcGISFeatureTable::objectIdField() const

Returns the name of field which contains the object ID for each feature.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::queryRelatedFeatureCount(Esri::ArcGISRuntime::ArcGISFeature *feature)

Requests a count of features related to the supplied feature.

Returns a TaskWatcher for the asynchronous operation.

This function was introduced in Esri::ArcGISRuntime 100.3.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::queryRelatedFeatureCount(Esri::ArcGISRuntime::ArcGISFeature *feature, const Esri::ArcGISRuntime::RelatedQueryParameters &relatedQueryParameters)

Requests a count of features related to the supplied feature based on the relatedQueryParameters.

Returns a TaskWatcher for the asynchronous operation.

This function was introduced in Esri::ArcGISRuntime 100.3.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::queryRelatedFeatures(Esri::ArcGISRuntime::ArcGISFeature *feature)

Queries for related features of a given feature in all relationships.

This table and all related tables must be associated with the same Map, either as a feature source for a layer or added to the Map via Map::tables(). Otherwise, the query will return no results.

This method returns a TaskWatcher for the asynchronous operation.

This function was introduced in Esri::ArcGISRuntime 100.1.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::queryRelatedFeatures(Esri::ArcGISRuntime::ArcGISFeature *feature, const Esri::ArcGISRuntime::RelatedQueryParameters &relatedQueryParameters)

Queries for features related to the given feature in a specific relationship.

  • feature - The feature.
  • relatedQueryParameters - Description of the relationship and the query to perform.

This table and related tables must be associated with the same Map, either as a feature source for a layer or added to the Map via Map::tables(). Otherwise, the query will return no results.

This method returns a TaskWatcher for the asynchronous operation.

This function was introduced in Esri::ArcGISRuntime 100.1.

QList<Esri::ArcGISRuntime::ArcGISFeatureTable *> ArcGISFeatureTable::relatedTables(const Esri::ArcGISRuntime::RelationshipInfo &relationshipInfo) const

Returns list of tables related by the given relationshipInfo.

Only returns tables that have been added to the same map. If there are multiple instances of the related table on the map, all such instances will be returned.

This function was introduced in Esri::ArcGISRuntime 100.1.

QList<Esri::ArcGISRuntime::ArcGISFeatureTable *> ArcGISFeatureTable::relatedTables() const

Returns a list of all related tables that have been added to the map.

Only returns tables that have been added to the map that this table is associated with.

This function was introduced in Esri::ArcGISRuntime 100.1.

qint64 ArcGISFeatureTable::serviceLayerId() const

Returns the layer ID in the feature service that this table was created from.

Note, service layer ID can only be obtained after the table is loaded, with the exception of GeodatabaseFeatureTable which can obtain the service layer ID after instantiation.

void ArcGISFeatureTable::setUseAdvancedSymbology(bool advancedSymbology)

Sets whether the dataset should be visualized using advanced CIM symbology from the service.

  • advancedSymbology - Whether to support advanced symbology.

You cannot change this property after the table is successfully loaded.

The default value is true.

Services that do not support CIM symbols will ignore this property and return regular symbols instead.

See also isUseAdvancedSymbology().

QString ArcGISFeatureTable::subtypeField() const

Return the table's subtype field.

If the table does not have subtypes, an empty string is returned.

This function was introduced in Esri::ArcGISRuntime 100.3.

QString ArcGISFeatureTable::typeIdField() const

Returns the name of the field that contains the subtype information for each feature.

QJsonObject ArcGISFeatureTable::unknownJson() const

Returns the unknown data from the source JSON.

Unknown JSON is a QJsonObject of values that was in the source JSON but was not parsed by the Runtime.

This function was introduced in Esri::ArcGISRuntime 100.8.

QJsonObject ArcGISFeatureTable::unsupportedJson() const

Returns the unsupported data from the source JSON.

Unsupported JSON is a QJsonObject of values that are supported by webmaps, but not exposed through the native Runtime API.

This function was introduced in Esri::ArcGISRuntime 100.8.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::updatedFeatures()

Requests a collection of features updated in the local dataset but not yet updated in the original source dataset.

Returns a TaskWatcher for the asynchronous operation.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::updatedFeaturesCount()

Requests a count of features updated in the local dataset but not yet updated in the original source dataset.

Returns a TaskWatcher for the asynchronous operation.

Esri::ArcGISRuntime::TaskWatcher ArcGISFeatureTable::validateRelationshipConstraints(Esri::ArcGISRuntime::ArcGISFeature *feature)

Validates constraints for a given feature participating in a relationship.

This method returns a TaskWatcher for the asynchronous operation.

The following are considered violations:

To recover from an orphaned destination feature violation, relate it to a valid origin feature. You can usually recover from a cardinality violation by un-relating the appropriate features. See ArcGISFeature::unrelateFeature.

Edit operations do not cause an error when there are constraint violations. This allows you to recover from violations in a back office operation after applying edits or syncing, if you choose to do so. See ArcGIS Desktop topic Validating features and relationships in ArcMap for a description of that process.

This method makes network calls to query for the related features if they are not present locally. If you have just related the feature you are validating, first you must call FeatureTable::updateFeature to reflect the modified attribute value in the table. If this is not done, validation results may be incorrect.

This function was introduced in Esri::ArcGISRuntime 100.1.


Feedback on this topic?