laptop and a wrench

Bug

The Search widget does not honor filter by where clause and filter by geometry in ArcGIS API for JavaScript 3.21.

Last Published: August 18, 2017 ArcGIS API for JavaScript
Bug ID Number BUG-000106693
SubmittedJuly 19, 2017
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found3.21
StatusWill Not Be Addressed

Additional Information

The filter property should only have been doc'd for 4.x. SearchQueryParams and suggestQueryParams has been deprecated for 3.x. To get around this, please you can use the esriRequest.setRequestPreCallback Documentation will be updated to reflect that 3.x does not include this property.

Workaround

Set definition expression for the feature layer and use the feature layer in the Search widget's sources. This workaround however does not work for filter by geometry.sources: [{ featureLayer: new FeatureLayer("<a href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/MapServer/0" target="_blank">https://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/MapServer/0</a>", { outFields: ["*"], infoTemplate: new InfoTemplate("Emergency Facilities", "facname: ${facname}organiz: ${organiz}",definitionExpression: "organiz = 'City of Redlands'") }), searchFields: ["facname"], placeholder: "Redlands Community Hospital", name: "Emergency Facilities" }]

Steps to Reproduce

Bug ID: BUG-000106693

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options