Set QueryParameters.MaxFeatures and catch a exception

400
3
06-06-2017 07:03 PM
Highlighted
New Contributor III

When I set QueryParameters.MaxFeatures  execute query then will catch a exception(Unable to complete operation.), but don't set it codes go well

Tags (1)
Reply
0 Kudos
3 Replies
Highlighted
New Contributor III

I notice that some featureserver with different  Advanced Query Capabilities,some having all the Advanced Query Capabilities true supports can ServiceFeatureTable.QueryFeaturesAsync(QueryParameters parameters, QueryFeatureFields queryFeatureFields) with setting QueryParameters.MaxFeatures , does this Advanced Query Capabilities matters?

Reply
0 Kudos
Highlighted
Frequent Contributor

Is `NAME` a field name in the service? If you use a name that does not exist on server you will get the same error:

For example, when if I mistyped with `NAM` for `NAME`: http://sampleserver6.arcgisonline.com/arcgis/rest/services/Notes/FeatureServer/0/query?where=NAM+LIK...

FeatureTable.Fields should be able to give you the name to use in your query, it includes the same metadata found on server (i.e. FieldType, Name, Alias, IsEditable, etc).

Reply
0 Kudos
Highlighted
New Contributor III

Hi Jennifer 

I do have the field "Name", I checked and  i did't mistyped either

Thanks for your detail reply

Reply
0 Kudos