Select to view content in your preferred language

Query Task Question...

808
3
08-20-2010 06:53 PM
WesBailes
Occasional Contributor
I'm working through some of the samples and am a little stumped with the query task sample.  I found that in one of the tutorials that the querytask utilizes the displayfield for searching.  Is there any way to query other fields in a specific layer?  What about standalone tables?  Thanks!
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Wes,

   The Query.text
Shorthand for a literal search text on the display field, equivalent to: where YourDisplayField like '%SearchText%'.


The Query.where is what you want to use if you want to specify a different kind of SQL query.

for querying stand alone tables you need to look at Feature Layer
The feature layer can be used to display features from one layer (or non-spatial table) of a Feature Service or a Map Service. If the underlaying layer (or table) is from a Feature Service , it can be used to edit features and apply those edits back to the server.


See documentation. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html
0 Kudos
DasaPaddock
Esri Regular Contributor
The QueryTask works with standalone tables too. (Internally the FeatureLayer uses the QueryTask.)
0 Kudos
WesBailes
Occasional Contributor
Thanks guys!  Exactly what I needed!
0 Kudos