import FieldInput from "@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput.js";
const FieldInput = await $arcgis.import("@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput.js");
@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput
This is a read-only support class that represents a field input in a BatchAttributeForm.
Property Overview
Name | Type | Summary | Class |
---|---|---|---|
The type of data displayed by the field input. | FieldInput | ||
The name of the class. | Accessor | ||
The input's description. | FieldInput | ||
Returns an array of distinct values of the field input. | FieldInput | ||
The input value's domain. | FieldInput | ||
The type of edit operation the form is being used for. | FieldInput | ||
Indicates if the input is editable. | FieldInput | ||
Indicates if the field is editable. | FieldInput | ||
Indicates whether the input pertains to all the features in the BatchAttributeForm in which the input belongs. | FieldInput | ||
Indicates whether all features have the same value for this field. | FieldInput | ||
The associated field. | FieldInput | ||
The field name as defined by the feature layer. | FieldInput | ||
The group containing the field input. | FieldInput | ||
Indicates whether time information is included for date and time inputs. | FieldInput | ||
Indicates whether timestamp information is included for date inputs. | FieldInput | ||
An array of features that do not have a valid value for this field. | FieldInput | ||
The input's label. | FieldInput | ||
An array of layers included in the BatchAttributeForm. | FieldInput | ||
Restricts the input length. | FieldInput | ||
Restricts the input length. | FieldInput | ||
Indicates whether the field is required. | FieldInput | ||
The type of input. | FieldInput | ||
Indicates whether the user has changed the value of this field. | FieldInput | ||
Indicates whether the field has any validation errors. | FieldInput | ||
Indicates whether the input is visible. | FieldInput |
Property Details
-
dataType
dataType Stringreadonly
-
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.Possible Values:"number" |"text" |"date" |"unsupported"
-
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.
-
domain
domain CodedValueDomain |RangeDomain |InheritedDomain |null |undefinedreadonly
-
The input value's domain. This is used to constrain the allowable values of the layer.
-
editType
editType String
-
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
FieldInput
s with value expressions, this property is also used in determining whether or not the value expressions should be applied. Per the href="https://developers.arcgis.com/web-map-specification/objects/formFieldElement/">https://developers.arcgis.com/web-map-specification/objects/formFieldElement/ 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 thesupportsAdd
capability but does not have thesupportsUpdate
capability, then the value expression will be applied ifeditType
isINSERT
but ignored ifeditType
isUPDATE
.For the purposes of determining whether or not the layer allows the current edit type, a value of
"NA"
is always considered allowed.Possible Values:"INSERT" |"UPDATE" |"DELETE" |"NA"
- Default Value:"NA"
-
editable
editable Booleanreadonly
-
Indicates if the input is editable.
-
editable
editable Booleanreadonly
-
Indicates if the field is editable. The field must be editable for all layers associated with the input for this property to be true.
-
existsInAllLayers
existsInAllLayers Boolean
-
Indicates whether the input pertains to all the features in the BatchAttributeForm in which the input belongs.
- Default Value:true
-
featuresHaveSameValue
featuresHaveSameValue Booleanreadonly
-
Indicates whether all features have the same value for this field.
-
field
field Fieldreadonly
-
The associated field.
-
fieldName
fieldName Stringreadonly
-
The field name as defined by the feature layer.
-
group
group GroupInput |null |undefinedreadonly
-
The group containing the field input.
-
includeTime
includeTime Booleanreadonly
-
Indicates whether time information is included for date and time inputs.
-
includeTimeOffset
includeTimeOffset Booleanreadonly
-
Indicates whether timestamp information is included for date inputs. This property is always
false
for field types other thantimestamp-offset.
- Default Value:false
-
An array of features that do not have a valid value for this field.
-
layers
layers Array<(FeatureLayer|GeoJSONLayer|SceneLayer|SubtypeSublayer|OrientedImageryLayer)>readonly
-
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
featureLayer
property) - SubtypeSublayer
- OrientedImageryLayer
- See also
-
maxLength
maxLength Numberreadonly
-
Restricts the input length. For fields that have no maximum length specified, this property will be
-1
.
-
minLength
minLength Numberreadonly
-
Restricts the input length. For fields that have no minimum length specified, this property will be
-1
.
-
required
required Booleanreadonly
-
Indicates whether the field is required. This property will be true if it is required for any of the layers associated with the input.
-
type
type Stringreadonly
-
The type of input.
For FieldInput the type is always "field".
-
userHasChangedValue
userHasChangedValue Booleanreadonly
-
Indicates whether the user has changed the value of this field.
- Default Value:false
-
valid
valid Booleanreadonly
-
Indicates whether the field has any validation errors. Evaluates to
true
if and only if the value of this field is valid for all features.
-
visible
visible Booleanreadonly
-
Indicates whether the input is visible.
Method Overview
Name | Return Type | Summary | Class |
---|---|---|---|
Adds one or more handles which are to be tied to the lifecycle of the object. | Accessor | ||
Returns true if a named group of handles exist. | Accessor | ||
Removes a group of handles owned by the object. | Accessor |
Method Details
-
Inherited from Accessor
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();
ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.
-
hasHandles
InheritedMethodhasHandles(groupKey){Boolean}
Inherited from Accessor -
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType Description Boolean Returns true
if a named group of handles exist.Example// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
Inherited from Accessor
-
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");