how to filter data in a FeatureLayer

Discussion created by rhguimenes on May 8, 2012
Latest reply on May 8, 2012 by pmbushore
Hi all!!

I'm a new user of ArcGIS and i i doubt a simple.

I have a layer on my server ARCGIS. This layer looks for information that is in a database

I would like to filter the data of layer via javascript.


[INDENT]Layer: Customers
Table of database: TCustomers
Layer in the javascript:
var featureLayerUrl = "http://vminter:8399/arcgis/rest/services/Layer/MapServer/0";
featureLayer = new esri.layers.FeatureLayer(featureLayerUrl, {
          maxAllowableOffset: maxOffset(map,1)

I want the layer show only customers with a name like jony. Anyone know how to do this via javascript?