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 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.
NameTypeSummary
String

The name of the class.

more details
more details
String

The geodatabase version.

more details
more details
Object

The options to be used for data requests.

more details
more details
String

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

more details
more details

Property Details

declaredClassStringreadonly

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

gdbVersionString

The geodatabase version.

requestOptionsObject

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 TypeSummary
Promise

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

more details
more details

Method Details

execute(params, requestOptions){Promise}

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
PromiseResolves 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

There were no match results from your search criteria.