Skip To Content ArcGIS for Developers Sign In Dashboard

ServiceFeatureTable QML Type

A dataset from an individual layer or table in an ArcGIS map service or feature service. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.0
Inherits:

ArcGISFeatureTable

Properties

Signals

Methods

Detailed Description

The service may be hosted in the cloud on ArcGIS Online, or on-premises on ArcGIS Server. The data is retrieved from the service as needed and stored in a mobile geodatabase on the local file system. How data is retrieved depends upon the featureRequestMode.

When using a feature service, you can potentially create, delete, and update the data depending upon whether the service allows those operations, who owns the data, and what ownership-based access control policies are in place. Use the methods canAdd(), canUpdate(), canDelete(), and canEditGeometry() to determine what operations are permitted.

If the service supports attachments, you can also view and potentially edit the attachments.

You can also query the table based on SQL expressions and spatial relationships.

This type is typically used in conjunction with a FeatureLayer to display feature data on a map. It can handle temporary network outages while still allowing you to work with the data that has already been retrieved from the service. Your edits are immediately persisted to the mobile geodatabase and can be applied to the service later when network connectivity is restored.

If the table has relationships, you can get related tables, query for related features and edit them.

When used to create a FeatureLayer in a MapView, features are projected on the fly to match the spatial reference of the map.

Service feature table adopts the loadable pattern; many of its properties are initialized asynchronously after connecting to the service. See Loadable for more information.

You can initialize the service feature table in several different ways: creating from a URL, creating for another service feature table and relationship info, or creating from portal item and layer ID. Note that the Portal Item and layer ID properties must be used together or not at all. Each method of initialization is mutually exclusive.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
Credentialcredential
RequestConfigurationrequestConfiguration (since Esri.ArcGISRuntime 100.1)
ServiceFeatureTableinitRelatedTable (since Esri.ArcGISRuntime 100.1)
RelationshipInforelationshipInfo (since Esri.ArcGISRuntime 100.1)
ArcGISIteminitItem (since Esri.ArcGISRuntime 100.3)

See also Cancelable, Loadable, RemoteResource, and FeatureLayer.

Property Documentation

applyEditsResult : list<FeatureEditResult>

Returns the results of the applyEdits asynchronous task (read-only).


applyEditsStatus : Enums.TaskStatus

Returns the status of the applyEdits asynchronous task (read-only).

See also Enums.TaskStatus.


bufferFactor : double

The factor used to determine the size of the buffer around the map's current extent for which data is retrieved from the service.

The bufferFactor property only applies when to Enums.FeatureRequestModeOnInteractionCache.

Data is not retrieved again until either it expires or the map extent changes and is no longer located in the buffered extent. The buffer factor can be a value up to 10. If it is set to 0 or 1, then every time the map extent is changed, data for that extent will be requested from the service.

The Default value is 2.0.


[default] credential : Credential

The security credential used to access the feature service.

This is only applicable if the service is secured.


definitionExpression : string

The SQL statement where clause used to filter the features by attributes.

This QML property was introduced in Esri.ArcGISRuntime 100.2.


featureRequestMode : Enums.FeatureRequestMode

The mode used to retrieve features from the service.

The default value is Enums.FeatureRequestModeOnInteractionCache.

See also Enums.FeatureRequestMode.


geodatabaseVersion : string

The geodatabase version.


[default] initItem : ArcGISItem

The existing ArcGISItem used to create the table.

This property must be used in conjunction with the initLayerId property.

The Item must be a PortalItem and correspond to a map service or a feature service.

This QML property was introduced in Esri.ArcGISRuntime 100.3.


initLayerId : string

The layer ID of the service's layer to use to create the table.

This property must be used in conjunction with the initItem property.

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

Note: initLayerId and initLayerIdAsInt can be used interchangeably. Both reference the same underlying Runtime property.

This QML property was introduced in Esri.ArcGISRuntime 100.3.

See also initLayerIdAsInt.


initLayerIdAsInt : int

The same as initLayerId but represented as an integer type (read-only).

Note: The underlying Runtime property is represented as a 64-bit integer type. See Accessing 64-bit integer properties from QML.

Note: initLayerIdAsInt and initLayerId can be used interchangeably. Both reference the same underlying Runtime property.

This QML property was introduced in Esri.ArcGISRuntime 100.3.


[default] initRelatedTable : ServiceFeatureTable

The table to relate to this table using relationshipInfo.

This QML property was introduced in Esri.ArcGISRuntime 100.1.


loadOrRefreshFeaturesStatus : Enums.TaskStatus

Returns the status of the loadOrRefreshFeatures asynchronous task (read-only).

This QML property was introduced in Esri.ArcGISRuntime 100.3.

See also Enums.TaskStatus.


populateFromServiceResult : list<FeatureQueryResult>

Returns the results of the populateFromService asynchronous task (read-only).


populateFromServiceStatus : Enums.TaskStatus

Returns the status of the populateFromService asynchronous task (read-only).

See also Enums.TaskStatus.


[default] relationshipInfo : RelationshipInfo

Description of the relationship between this table and the initRelatedTable.

This QML property was introduced in Esri.ArcGISRuntime 100.1.


[default] requestConfiguration : RequestConfiguration

The configuration parameters used for network requests sent by this task.

This QML property was introduced in Esri.ArcGISRuntime 100.1.


undoLocalEditsStatus : Enums.TaskStatus

Returns the status of the undoLocalEdits asynchronous task (read-only).

This QML property was introduced in Esri.ArcGISRuntime 100.3.

See also Enums.TaskStatus.


url : url

The url of an individual layer or table in an ArcGIS map service or feature service whose data needs to be accessed or edited.


Signal Documentation

applyEditsStatusChanged()

Emitted when the applyEditsStatus property changes.


bufferFactorChanged()

Emitted when the bufferFactor property changes.


credentialChanged()

Emitted when the credential property changes.


definitionExpressionChanged()

Emitted when the definitionExpression property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.2.


featureRequestModeChanged()

Emitted when the featureRequestMode property changes.


geodatabaseVersionChanged()

Emitted when the geodatabaseVersion property changes.


initItemChanged()

Emitted when the initItem property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.3.


initLayerIdAsIntChanged()

Emitted when the initLayerIdAsInt property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.3.


initLayerIdChanged()

Emitted when the initLayerId property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.3.


initRelatedTableChanged()

Emitted when the initRelatedTable property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.1.


loadOrRefreshFeaturesStatusChanged()

Emitted when the loadOrRefreshFeaturesStatus property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.3.


populateFromServiceStatusChanged()

Emitted when the populateFromServiceStatus property changes.


relationshipInfoChanged()

Emitted when the relationshipInfo property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.1.


requestConfigurationChanged()

Emitted when the requestConfiguration property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.1.


undoLocalEditsStatusChanged()

Emitted when the undoLocalEditsStatus property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.3.


urlChanged()

Emitted when the url property changes.


Method Documentation

string applyEdits()

Applies the temporary edits in the mobile geodatabase to the service using an asynchronous task.

This method uses an asynchronous task that cannot be started if it is already running from a previous call to applyEdits. You should check that the applyEditsStatus property is not Enums.TaskStatusInProgress before calling this method.

After the task starts, you may use the signal applyEditsStatusChanged to monitor task status.

Returns a task ID that can be used to cancel the applyEdits task.

See also Enums.TaskStatus and Cancelable.


void clearCache(bool keepLocalEdits = true)

Clears all the data in the table, including any temporary edits.

If keepLocalEdits is true, then edited rows in the table won't be cleared.


string loadOrRefreshFeatures(list<Feature> features)

Loads all attributes and geometry for unloaded features, or refetches attributes and geometry from features that are already loaded.

This method uses an asynchronous task that cannot be started if it is already running from a previous call to loadOrRefreshFeatures. You can check that the loadOrRefreshFeaturesStatus property is not Enums.TaskStatusInProgress before calling this method.

After the task starts, you may use the signal loadOrRefreshFeaturesStatus to monitor task status.

Returns a task ID that can be used to cancel the loadOrRefreshFeatures task.

  • features - The list of features to be loaded/refreshed. Any features which were not returned by the service will have their OBJECTID cleared to indicate they are no longer associated with the table.

Note: This method will not refresh feature attachments. Use Feature.attachments.fetchAttachments to retrieve attachments instead.

Note: After calling this method, any unapplied local edits on the table will be lost.

This QML method was introduced in Esri.ArcGISRuntime 100.3.

See also Enums.TaskStatus and Cancelable.


string populateFromService(QueryParameters parameters, bool clearCache, list<string> outFields)

Queries data from the service to populate the table using an asynchronous task.

Requests data from the service using specified query parameters, whether to clear the existing cache with clearCache and the specified outFields. The fetched data is added to the local copy of the table.

This method uses an asynchronous task that cannot be started if it is already running from a previous call to populateFromService. You should check that the populateFromServiceStatus property is not Enums.TaskStatusInProgress before calling this method.

After the task starts, you may use the signal populateFromServiceStatusChanged to monitor task status.

Returns a task ID that can be used to cancel the populateFromService task.

See also Enums.TaskStatus and Cancelable.


string queryFeaturesWithFieldOptions(QueryParameters parameters, Enums::QueryFeatureFields queryFeatureFields)

Queries for features in this FeatureTable using an asynchronous task.

  • parameters - Parameters that specify how to filter the query and return results.
  • queryFeatureFields - An Enums.QueryFeatureFields enumeration value indicating which fields to return from the query.

The queryFeaturesWithFieldOptions function may be run concurrently. The last result will always be stored in the queryFeaturesResult property. To keep track of concurrent tasks, the queryFeaturesResults property can be used to sort multiple results, mapped to the task ID of each task.

Returns a task ID that can be used to cancel the queryFeaturesWithFieldOptions task. The task ID is also used to locate the specific result in queryFeaturesResults for this task.

See also Cancelable.


string queryRelatedFeaturesWithFieldOptions(Feature feature, RelatedQueryParameters relatedQueryParameters, Enums::QueryFeatureFields queryFeatureFields)

Queries for features related to the given feature using the given related query parameters and query feature fields.

  • feature - The feature whose related features are to be queried.
  • relatedQueryParameters - Parameters that specify how to filter the query and return results.
  • queryFeatureFields - An Enums.QueryFeatureFields enumeration value indicating which fields to return from the query.

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

The queryRelatedFeaturesStatusChanged signal emits when the operation is complete. Check the queryRelatedFeaturesStatus property to make sure the operation completed successfully. The results are then available through queryRelatedFeaturesResults.

This QML method was introduced in Esri.ArcGISRuntime 100.1.

See also Cancelable.


string undoLocalEdits()

Undoes all of the local edits since the last successful applyEdits.

All features that were added, updated, or deleted after the last successful applyEdits will revert back to their original state; thus, any in-memory features must be discarded in favor of a new query result. Returns a task ID that can be used to cancel the applyEdits task.

This QML method was introduced in Esri.ArcGISRuntime 100.3.

See also Enums.TaskStatus and Cancelable.



Feedback on this topic?