My query:
../Mapserver/5/query?f=pjson&where="PROJECTNUMBER"="ABC123"
Returns:
{"error": {"code": -2147216086,"message": "Failed to execute query.","details": []}}
The server is running version 10.31. My query was built by example from the docs (https://developers.arcgis.com/rest/services-reference/query-map-service-layer-.htm) and I've tried PROJECTNUMBER with and without the quotes.
Am I missing something?
Hi Lars Fagerbakke,
I think your query should be
../Mapserver/5/query?f=pjson&where=PROJECTNUMBER='ABC123'
i.e. Field name unquoted and value single quoted
I tested this with this URL:
https://mapservices.prorail.nl/arcgis/rest/services/Gebiedsindelingen_ProRail_005/MapServer/14/query?where=PGO_GEBIED_NAAM+%3D+%27Betuwe%27&outFields=*&returnGeometry=true&f=json
Does this solve your issue?
BR,
Egge-Jan
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.