FieldInput

ESM: import FieldInput from "@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput.js";
CDN: const FieldInput = await $arcgis.import("@arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput.js");
Class: @arcgis/core/widgets/BatchAttributeForm/inputs/FieldInput
Inheritance: FieldInput→Accessor
Since: ArcGIS Maps SDK for JavaScript 4.33

This is a read-only support class that represents a field input in a BatchAttributeForm.

See also

Property Overview

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
Show inherited properties Hide inherited properties
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

Property
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"

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

description

Property
description String |null |undefinedreadonly

The input's description.

distinctValues

Property
distinctValues Array<(number|string|null|undefined)>readonly

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

Property
domain CodedValueDomain |RangeDomain |InheritedDomain |null |undefinedreadonly

The input value's domain. This is used to constrain the allowable values of the layer.

editType

Property
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 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 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.

Possible Values:"INSERT" |"UPDATE" |"DELETE" |"NA"

Default Value:"NA"

editable

Property
editable Booleanreadonly

Indicates if the input is editable.

editable

Property
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

Property
existsInAllLayers Boolean

Indicates whether the input pertains to all the features in the BatchAttributeForm in which the input belongs.

Default Value:true

featuresHaveSameValue

Property
featuresHaveSameValue Booleanreadonly

Indicates whether all features have the same value for this field.

field

Property
field Fieldreadonly

The associated field.

fieldName

Property
fieldName Stringreadonly

The field name as defined by the feature layer.

group

Property
group GroupInput |null |undefinedreadonly

The group containing the field input.

includeTime

Property
includeTime Booleanreadonly

Indicates whether time information is included for date and time inputs.

includeTimeOffset

Property
includeTimeOffset Booleanreadonly

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

Property
invalidFeatures Graphic[]readonly

An array of features that do not have a valid value for this field.

label

Property
label String |null |undefinedreadonly

The input's label.

An array of layers included in the BatchAttributeForm. Each layer must support feature editing and field access.

The following layer types are supported:

maxLength

Property
maxLength Numberreadonly

Restricts the input length. For fields that have no maximum length specified, this property will be -1.

minLength

Property
minLength Numberreadonly

Restricts the input length. For fields that have no minimum length specified, this property will be -1.

required

Property
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

Property
type Stringreadonly

The type of input.

For FieldInput the type is always "field".

userHasChangedValue

Property
userHasChangedValue Booleanreadonly

Indicates whether the user has changed the value of this field.

Default Value:false

valid

Property
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

Property
visible Booleanreadonly

Indicates whether the input is visible.

Method Overview

Show inherited methods Hide inherited methods
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

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
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();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key 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

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type 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");
}

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.