Select to view content in your preferred language

Attribute Query on Muitiple fields

384
1
10-28-2010 10:45 AM
ChristineZeller
Occasional Contributor
Attribute Query on Multiple fields

Hello all,
I was wondering if there is an example of attribute query on multiple fields or if someone could help me construct the schema.  Basically, I???m building a project where my end users want to query one layer but multiple fields (a police calls for service dispatch point layer). 
They are interested in asking 3 basic questions:

What kind of Calls/Crimes are you looking for (The layer has a Calls for service/Crimes type fields)?
Where are you interested in (the layer has a beat/sector field)?
When (there are date /time fields) and I would like to provide a date/time calendar picker.

All the same layer???..3 fields are queried and then results are shown on the map and in a table grid.

Thanks
Christine Zeller
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
You can use Where property of the Query http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Quer...

In this feature service, I'm able to perform query on any number of fields:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer...
Where = ftype <> 10501 and fcode <> 10501 and objectid > 9155

The FeatureLayer.LayerInfo.Fields have the following members http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Field_memb..., the field's type will help you determine how you choose what control to use (i.e. DateTimePicker).
0 Kudos