require(["esri/tasks/FindTask"], function(FindTask) { /* code goes here */ });
Class: esri/tasks/FindTask
Inheritance: FindTask Task Accessor
Since: ArcGIS API for JavaScript 4.0

Search a map service exposed by the ArcGIS Server REST API based on a string value. The search can be conducted on a single field of a single layer, on many fields of a layer, or on many fields of many layers.

Use FindParameters to set the parameters of the task. The result will be an instance of FindResult.

Known Limitations

IdentifyTask is currently not supported if attempting to be used:

See also:

Constructors

new FindTask(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 geodatabase version.

more details
more detailsFindTask
Object

The options to be used for data requests.

more details
more detailsTask
String

URL to the ArcGIS Server REST resource that represents a map service.

more details
more detailsFindTask

Property Details

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

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

gdbVersionString

The geodatabase version.

requestOptionsObject inherited

The options to be used for data requests. These options can also be controlled through the requestOptions method parameter.

URL to the ArcGIS Server REST resource that represents a map service.

Method Overview

NameReturn TypeSummaryClass
Promise<Object>

Sends a request to the ArcGIS REST map service resource to perform a search based on the input params.

more details
more detailsFindTask

Method Details

execute(params, requestOptions){Promise<Object>}

Sends a request to the ArcGIS REST map service resource to perform a search based on the input params.

Parameters:

Specifies the layers and fields that are used for the search.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
Promise<Object>Resolves to an object with the following properties:
PropertyTypeDescription
resultsFindResult[]An array of objects containing the result features of the Find task.
exceededTransferLimitBooleanexceededTransferLimit is included in the response only if the result exceeded the transfer limit.

API Reference search results

NameTypeModule
Loading...