Skip To ContentArcGIS for DevelopersSign In Dashboard
require(["esri/popup/FieldInfo"], function(FieldInfo) { /* code goes here */ });
Class: esri/popup/FieldInfo
Inheritance: FieldInfo Accessor
Since: ArcGIS API for JavaScript 4.11

The FieldInfo class defines how a Field participates, or in some cases, does not participate, in a PopupTemplate.

See also:
Example:
let fieldInfo = new FieldInfo({
  fieldName: 'PROMINENCE_ft',
  label: 'Prominence (feet)',
  //autocasts to FieldInfo.Format
  format: {
    places: 0,
    digitSeparator: true
  }
};

Constructors

new FieldInfo(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
String

The field name as defined by the service or the name of an Arcade expression.

more details
more detailsFieldInfo
FieldInfoFormat

Class which provides formatting options for numerical or date fields and how they should display within a popup.

more details
more detailsFieldInfo
Boolean

A Boolean determining whether users can edit this field.

more details
more detailsFieldInfo
String

A string containing the field alias.

more details
more detailsFieldInfo
String

Used in a one:many or many:many relationship to compute the statistics on the field to show in the popup.

more details
more detailsFieldInfo
String

A string determining what type of input box editors see when editing the field.

more details
more detailsFieldInfo
String

A string providing an editing hint for editors of the field.

more details
more detailsFieldInfo
Boolean

Indicates whether the field is visible in the popup window.

more details
more detailsFieldInfo

Property Details

declaredClass Stringreadonly inherited

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

fieldName String

The field name as defined by the service or the name of an Arcade expression. Arcade expression names are defined in the expressionInfos property. When referencing Arcade expressions, you must preface the name with expression/, such as expression/percent-total.

Class which provides formatting options for numerical or date fields and how they should display within a popup.

isEditable Boolean

A Boolean determining whether users can edit this field. This is not applicable to Arcade expressions.

Default Value:false
label String

A string containing the field alias. Not applicable to Arcade expressions as the title is used instead.

statisticType String

Used in a one:many or many:many relationship to compute the statistics on the field to show in the popup. If the property is present, must be one of the following values:

Possible Values: count | sum | min | max | avg | stddev | var

stringFieldOption String

A string determining what type of input box editors see when editing the field. Applies only to string fields. This is not applicable to Arcade expressions. If this property is present, it must be one of the following values:

Possible Values: rich-text | text-area | text-box

Default Value:text-box
tooltip String

A string providing an editing hint for editors of the field. This is not applicable to Arcade expressions.

visible Boolean

Indicates whether the field is visible in the popup window.

Default Value:true

Method Overview

NameReturn TypeSummaryClass
FieldInfo

Creates a deep clone of the FieldInfo class.

more details
more detailsFieldInfo
*

Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform.

more details
more detailsFieldInfo
Object

Converts an instance of this class to its ArcGIS portal JSON representation.

more details
more detailsFieldInfo

Method Details

clone(){FieldInfo}

Creates a deep clone of the FieldInfo class.

Returns:
TypeDescription
FieldInfoA deep clone of the FieldInfo instance.
fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter:
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns:
TypeDescription
*Returns a new instance of this class.
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() topic in the Guide for more information.

Returns:
TypeDescription
ObjectThe ArcGIS portal JSON representation of an instance of this class.

API Reference search results

NameTypeModule
Loading...