I need a query to give me an out field that is also part of the where query is this possible?
smQueryTask= new esri.tasks.QueryTask("/arcgis/services/serverlocation");
smQuery = new esri.tasks.Query();
smQuery.returnGeometry = true;
smQuery.outFields = ['Mile Value']; <-this is the value i want
smQuery.where = locationsQuery; <- it also happens to be a field in the where(which works fine i.e. where ['Mile Value'..])
console.log(smQuery); <-this is for debugging where i see the wrong values
drawQueryThings();
........
// draw all locations
function drawQueryThings() {
// execute query task
console.log("Drawing QueryObjects");
smQueryTask.execute(smQuery, function(drawAllQueryResults) {
for (var i = 0 l = drawAllQueryResults.features.length; i < l; i++) {
console.log(drawAllQueryResults.features); <-no features in there except for a completely unrelated attribute
...
}
Here are the values from firebug1. outFields ["Mile Value"] 0" Mile Value"2. undefined.hopefully this makes a little sense to somebody what I am trying to accomplish.