import FieldInput from "@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput.js";const FieldInput = await $arcgis.import("@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput.js");- Inheritance:
- FieldInput→
EditableInput<any>→ InputBase→ Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.33
This is a read-only support class that represents a field element in a BatchAttributeForm.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
dataType readonly | | |
declaredClass readonly inherited | ||
description readonly inherited | ||
distinctValues readonly | | |
domain readonly | | |
editable readonly | | |
editType readonly inherited | ||
existsInAllLayers readonly inherited | ||
featuresHaveSameValue readonly | | |
field readonly | | |
fieldName readonly | | |
group readonly | | |
includeTime readonly | | |
includeTimeOffset readonly | | |
invalidFeatures readonly | Graphic[] | |
label readonly | | |
layers readonly inherited | ||
maxLength readonly | | |
minLength readonly | | |
required readonly | | |
type readonly | "field" | |
userHasChangedValue readonly | | |
valid readonly | | |
visible readonly inherited |
dataType
- Type
- FieldInputDataTypes
The type of data displayed by the field input. Possible values are listed below.
| Value | Description |
|---|---|
| number | Input represents a number. |
| text | Input represents text. |
| date | Input represents a date. |
| unsupported | The field represents an unsupported value. A blob field type is an example of this. |
distinctValues
- Type
- FieldValue[]
Returns an array of distinct values of the field input. If all features have the same value, this property returns an array with a single element containing that value. If the features have different values, this property returns an array containing all distinct values of the field across the features.
editable
- Type
- boolean
Indicates if the field is editable. The field must be editable for all layers associated with the input for this property to be true.
editType
- Type
- EditType
The type of edit operation the form is being used for. This can influence whether a field is editable or not (e.g., the layer only allows certain edit operations)
This is also the value that will be set for the Arcade variable
$editcontext.editType in the Arcade context used to evaluate form
expressions.
Accepted values are "INSERT", "UPDATE", "DELETE", and "NA".
For FieldInputs with value expressions, this property is also used in
determining whether or not the value expressions should be applied. Per the
Web Map Specification,
value expressions are ignored if the associated layer field is not
editable. Determining whether the layer field is editable must consider
whether the specific type of edit being attempted is allowed. For example,
if a layer has the supportsAdd capability but does not have the
supportsUpdate capability, then the value expression will be applied if
editType is INSERT but ignored if editType is UPDATE.
For the purposes of determining whether or not the layer allows the current
edit type, a value of "NA" is always considered allowed.
- Default value
- "NA"
existsInAllLayers
- Type
- boolean
Indicates whether the input pertains to all the features in the BatchAttributeForm in which the input belongs.
- Default value
- true
featuresHaveSameValue
- Type
- boolean
Indicates whether all features have the same value for this field.
includeTime
- Type
- boolean
Indicates whether time information is included for date and time inputs.
includeTimeOffset
- Type
- boolean
Indicates whether timestamp information is included for date inputs. This
property is always false for field types other than timestamp-offset.
- Default value
- false
invalidFeatures
- Type
- Graphic[]
An array of features that do not have a valid value for this field.
layers
An array of layers included in the BatchAttributeForm. Each layer must support feature editing and field access.
The following layer types are supported:
- FeatureLayer
- GeoJSONLayer
- SceneLayer (with
featureLayerproperty) - SubtypeSublayer
- OrientedImageryLayer
- KnowledgeGraphSublayer
maxLength
- Type
- number
The maximum length of the input. If no length is specified, the value is -1.
minLength
- Type
- number
The minimum length of the input. If no length is specified, the value is -1.
required
- Type
- boolean
Indicates whether the field is required. This property will be true if it is required for any associated layers of the input.
userHasChangedValue
- Type
- boolean
Indicates whether the user has changed the value of this field.
- Default value
- false
valid
- Type
- boolean
Indicates whether the field has any validation errors. Evaluates to true only if the value of this field is valid for all features.