AnsweredAssumed Answered

FeatureTable syncSelection

Question asked by jestanford on May 13, 2016
Latest reply on May 17, 2016 by jestanford


I've created a custom featureLayer from a featureClass that's been created from some query results. I add it to the map and then used it to spin up a featureTable. The featureTable looks fine but I can't seem to get table records to sync with the map graphics.


When I select a feature from the table, the header says that one feature has been selected but the map doesn't pan, like in the samples and I get the following console error:


TypeError: Object doesn't support property or method 'emit' TypeError: Object doesn't support property or method 'emit'

   at Anonymous function (


If I choose "Center on Selection" from the Options menu I get an additional console error:


Error: FeatureLayer::_query - query contains one or more unsupported parameters


Can anyone point me to where I'm setting things up incorrectly?


var resultsLayerDefinition = {
    "geometryType": queryResults[0].geometryType,
    "fields": queryResults[0].fields
//Workaround. FeatureTable will not work with results directly.
var copyFeatures =, function (feature) {
    return new Graphic(feature.toJson());

var resultsFeatureClass = {
    layerDefinition: resultsLayerDefinition,
    featureSet: {
         "features": copyFeatures,
         "geometryType": queryResults[0].geometryType

this._resultsFeatureLayer = new FeatureLayer(resultsFeatureClass);

var renderer = new SimpleRenderer(this._pointSymbol);

this._resultsAttributeTable = new FeatureTable({
    "featureLayer" : this._resultsFeatureLayer,
    "map" :,
    "syncSelection": true,
    "zoomToSelection": true
}, 'attributeTable');



I'm using JSAPI 3.16.





ETA: It seems that others have reported this issue: JSAPI Feature layer created from feature collection and the feature table.