AnsweredAssumed Answered

WAB BatchAttr.Editor: featureLayerObject.selectFeatures NOT firing query

Question asked by gcontino on Mar 12, 2019
Latest reply on Mar 12, 2019 by gcontino

Hi,

I'm experiencing an issue with the widget BatchAttributeEditor of WAB:

It connects to a featureLayer (from an ArcGIS server), and at the end of drawing shape (or point) it should fire the query to the service, in order to select features of a query (c variable).

_selectSearchLayer: function (a) {   // a is the shape of selection
   var c = new U; // U is esri/query Object
   if ("point" === a.type || "polyline" === a.type) {
      var d = ea.getUnitValueForSR(this.map.spatialReference);
      c.geometry = da.buffer(a, 1, d)
   } else c.geometry = a;
   "FeatureQuery" === this.toolType && (c.outFields = [this.config.selectByLayer.queryField]);
   c.spatialRelationship = U.SPATIAL_REL_INTERSECTS;
   this.selectByLayer.layerObject.selectFeatures(c, W.SELECTION_NEW)
      .then(b.hitch(this, this._searchByLayerComplete)) // b.hitch is lang.hitch
},

When I use the point draw-tool it works,

when I use extent draw-tool instead, it selects features WITHOUT firing query.

It's very strange: I don't find the query in network console of browser, but if I draw an extent around features it selects correctly features, but without querying the service.
Could it be a matter of data-caching?

Thanks,

Gianni

Outcomes