abrown31

Using featureLayer.selectFeatures with a query string instead of geometry

Discussion created by abrown31 on Nov 29, 2012
Latest reply on Nov 29, 2012 by abrown31
I'm trying to select points on my featureLayer using a query.where string statement instead of providing the geometry of a drawn feature. Is this possible?

var query4 = new esri.tasks.Query();
    query4.returnGeometry = false;
    //query4.outFields = ["STA_NAME"];
    query4.where = "[ID_User] = " + userID + " and [NEWCHEMICAL] = '" + chemical + "' and [STD_ANATYPE] = '" + chem_type + "'";
    pointsLayer.selectFeatures(query4, esri.layers.FeatureLayer.SELECTION_NEW);


Currently, I receive duplicate errors:
Error {code: 400, message: "Unable to complete operation.", details: Array[0], log: undefined, _ssl: undefined}


Any ideas?
Thanks.

Outcomes