Arcgis mapserver query not working as expected

136 Views Asked by At

With the following mapserver, https://ndgishub.nd.gov/arcgis/rest/services/All_GovtBoundaries/MapServer/4/query, I have been using the query "TOWNSHIP='158' AND TDIR='N' AND RANGE='88' AND RDIR='W' AND SECTION ='10'" (minus the double-quotes) for months now. I just realized today that it is returning JSON as

{
 "error": {
  "code": 400,
  "extendedCode": -2147220985,
  "message": "Unable to complete operation.",
  "details": [
   
  ]
 }
}

Anyone know why I'm getting this error now?

1

There are 1 best solutions below

3
deadMilitia On

I still don't know what the JSON error code is, but for whatever reason it works just fine if I remove the single quotes from around the numeric values, like this: "TOWNSHIP=158 AND TDIR='N' AND RANGE=88 AND RDIR='W' AND SECTION =10" (minus the double-quotes).