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
PropertydataType 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 blobfield 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
Propertydomain CodedValueDomain |RangeDomain |InheritedDomain |null |undefinedreadonly -
The input value's domain. This is used to constrain the allowable values of the layer.
-
editType
PropertyeditType 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.editTypein 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 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 thesupportsAddcapability but does not have thesupportsUpdatecapability, then the value expression will be applied ifeditTypeisINSERTbut ignored ifeditTypeisUPDATE.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
Propertyeditable Booleanreadonly -
Indicates if the input is editable.
-
editable
Propertyeditable 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
PropertyexistsInAllLayers Boolean -
Indicates whether the input pertains to all the features in the BatchAttributeForm in which the input belongs.
- Default Value:true
-
featuresHaveSameValue
PropertyfeaturesHaveSameValue Booleanreadonly -
Indicates whether all features have the same value for this field.
-
field
Propertyfield Fieldreadonly -
The associated field.
-
fieldName
PropertyfieldName Stringreadonly -
The field name as defined by the feature layer.
-
group
Propertygroup GroupInput |null |undefinedreadonly -
The group containing the field input.
-
includeTime
PropertyincludeTime Booleanreadonly -
Indicates whether time information is included for date and time inputs.
-
includeTimeOffset
PropertyincludeTimeOffset Booleanreadonly -
Indicates whether timestamp information is included for date inputs. This property is always
falsefor field types other thantimestamp-offset.- Default Value:false
-
An array of features that do not have a valid value for this field.
-
layers
Propertylayers Array<(FeatureLayer|GeoJSONLayer|SceneLayer|SubtypeSublayer|OrientedImageryLayer|KnowledgeGraphSublayer)>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
featureLayerproperty) - SubtypeSublayer
- OrientedImageryLayer
- KnowledgeGraphSublayer
- See also
-
maxLength
PropertymaxLength Numberreadonly -
Restricts the input length. For fields that have no maximum length specified, this property will be
-1.
-
minLength
PropertyminLength Numberreadonly -
Restricts the input length. For fields that have no minimum length specified, this property will be
-1.
-
required
Propertyrequired 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
Propertytype Stringreadonly -
The type of input.
For FieldInput the type is always "field".
-
userHasChangedValue
PropertyuserHasChangedValue Booleanreadonly -
Indicates whether the user has changed the value of this field.
- Default Value:false
-
valid
Propertyvalid Booleanreadonly -
Indicates whether the field has any validation errors. Evaluates to
trueif and only if the value of this field is valid for all features.
-
visible
Propertyvisible 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 trueif 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");