require(["esri/opsdashboard/DataSourceProxy"], function(DataSourceProxy) { /* code goes here */ });
Description
(Added at v3.14)
(Currently in Mature Support) DataSourceProxy is a proxy class that represents a operations dashboard data source. Data source instances cannot be directly instantiated. To get a particular data source, extension mixins functions getDataSourceProxy or getDataSourceProxies should be used. The most commonly used function of data source is executeQuery.
Samples
Search for
samples that use this class.
Properties
Methods
Property Details
Read-only: The name of the display field.
Read-only: The collection of fields.
Read-only: The geometry type.
Read-only: The id of the data source.
Read-only: Indicates if the last query failed and the data source is in a broken state.
Default value: false
Read-only: The mapWidgetId of the data source. (Added at v3.15)
Read-only: The name of the data source.
Read-only: The name of the object id field.
Read-only: Indicates if the data source supports selections.
Default value: false
Read-only: The name of the type id field.
Read-only: The collection of feature types.
Method Details
Clear the selection. Only applicable if the data source is a selection data source, see
supportsSelection.
Executes a query and get the result.
Parameters:
<Query > query |
Required |
The query object to apply. |
An object that contains service level metadata about whether or not the layer supports queries using statistics, order by fields, DISTINCT, pagination, query with distance, and returning queries with extents. (Added at v3.15)
Retrieve the associated id of the data source that supports selection. Note: Not all data sources have an associated selection data source id, the result could be null.
Get the associated popupInfo for the data source if any available.
See also,
PopupTemplate.
Get the associated render object for the data source if any available.
Get the feature type from a feature coming from the data source.
Parameters:
<Graphic > feature |
Required |
A feature coming from the data source |
Returns the value corresponding to a field name from a feature coming from the data source. Getting the user friendly value can be a complicated series of steps including checking for feature types and/or coded domains.
Parameters:
<Graphic > feature |
Required |
A feature coming from the data source |
<String > fieldName |
Required |
The name of the field for which the value should be returned. |
Select features in the data source using a query. Only applicable if the data source is a selection data source, see
supportsSelection.
Parameters:
<Query > query |
Required |
The query object to apply |
Select features in the data source using a collection of object ids. Only applicable is the data source is a selection data source, see
supportsSelection.
Parameters:
<Number[] > objectIds |
Required |
The collection of object ids of the features to select. |