Which is close to what I need to do, except instead of the user entering the data it will be passed via a URL.
When I add the example to my code and just call doSearch() nothing happens. But then I don't see where events are being set so that when the expression is changed the start will be called.
Any pointers how to get search a featured layer without user input?
I knew there was a simple answer, but people sure love the fancy ones. In end I all I needed was:
var featureLayer:FeatureLayer = new FeatureLayer("http://mygisserver.com/ArcGIS/rest/services/MyService/MapServer/0"); featureLayer.outFields = [ '*' ]; featureLayer.alpha = 0.3; featureLayer.definitionExpression = "ID " + x; // x passed in via the URL featureLayer.visible = true; map.addLayer(featureLayer);