Skip To ContentArcGIS for DevelopersSign In Dashboard

fieldUtils

require(["esri/layers/support/fieldUtils"], function(fieldUtils) { /* code goes here */ });
Object: esri/layers/support/fieldUtils
Since: ArcGIS API for JavaScript 4.11

Convenience methods for getting field names used for feature layer labeling, elevation, editor tracking and time span.

Method Overview

NameReturn TypeSummaryObject
Promise<string[]>

Returns an array of field names used in the Arcade expression for calculating the Z values of features in the given feature layer's FeatureLayer.elevationInfo.

more details
more detailsfieldUtils
String[]

Returns an array of editor tracking field names for a given feature layer.

more details
more detailsfieldUtils
Promise<string[]>

Returns an array of field names used in the Arcade expression for labeling features in the given feature layer's FeatureLayer.labelingInfo.

more details
more detailsfieldUtils
Promise<string[]>

Returns an array of field names related to time.

more details
more detailsfieldUtils

Method Details

getElevationFields(layer){Promise<string[]>}

Returns an array of field names used in the Arcade expression for calculating the Z values of features in the given feature layer's FeatureLayer.elevationInfo.

Parameter:

The featureLayer to extract fields required for calculating feature Z values.

Returns:
TypeDescription
Promise<string[]>When resolved, returns an array of field names.
getFeatureEditFields(layer){String[]}

Returns an array of editor tracking field names for a given feature layer. It includes the fields from the FeatureLayer.editFieldsInfo.

Parameter:

The Feature Layer from which to extract editor tracking fields.

Returns:
TypeDescription
String[]An array of field names used for editor tracking.
getLabelingFields(layer){Promise<string[]>}

Returns an array of field names used in the Arcade expression for labeling features in the given feature layer's FeatureLayer.labelingInfo.

Parameter:

The Feature Layer from which to extract label fields.

Returns:
TypeDescription
Promise<string[]>When resolved, returns an array of field names used for labeling.
getTimeFields(layer){Promise<string[]>}

Returns an array of field names related to time. It includes the fields from the FeatureLayer.timeInfo, and the trackIdField.

Parameter:

The Feature Layer from which to extract time fields.

Returns:
TypeDescription
Promise<string[]>When resolved, returns an array of time field names.

API Reference search results

NameTypeModule
Loading...