AnsweredAssumed Answered

Error when trying to return query results

Question asked by thek04 on Sep 12, 2013
Latest reply on Sep 12, 2013 by cblinnmrc
Everytime I try to run my query I get
Error {code: 400, message: "Unable to complete  operation.", details: Array[1], log: undefined, httpCode: 400}  init.js

From what I understand this is a pretty generic error so I don't have much to work with.
Can anyone with a little more experience see what is causing the error?

require(["dojox/grid/DataGrid", "dojo/ready",     "esri/tasks/query","esri/tasks/QueryTask",     "dojo/dom","dojo/on","dojo/domReady!"], function(DataGrid,ready,Query,QueryTask,dom,on){     ready(function(){     var myQueryTask, myQuery;     myQueryTask = new QueryTask("http://services.azgs.az.gov/ArcGIS/rest/services/aasggeothermal/AZWellHeaders/MapServer/0");      myQuery = new Query();     myQuery.returnGeometry = false;     myQuery.outFeilds = ["*"]     function runQuery(){     var apiNo = dom.byId('apinum').value;     var otherId = dom.byId('stateperm');       myQuery.where ="apino like '%" + apiNo + "%'" + "OR" + "otherid like '%" + otherId + "%'";     myQueryTask.execute(myQuery,showResults);  } function showResults(myFeatures){     console.log(myFeatures);     var s = "";           for (var i=0, il=myFeatures.features.length; i < il; i++) {             var featureAttributes = myFeatures.features[i].attributes;             for (att in featureAttributes) {               s = s + "<strong>" + att + ": </strong>" + featureAttributes[att] + "<br />";             }           }           dojo.byId("info").innerHTML = s;  } on(dom.byId("executeButton"), "click", runQuery);     }); });

Outcomes