How to highlight queried features in attribute table?

150
1
05-13-2021 07:07 AM
DávidGregor
New Contributor II

Hello! I'm looking for a solution for a long time... 

I have a WAB app, with a point feature query widget.

we're using dynamicsMapServiceLayers.

You can see here, how i show my results. But how can a syncronise this with the Attribute table widget? 

Right now, every point is listed in the table. The best would be if i could show only the queried ones. But selection is also good. Any idea?

 

 

        var pointLayer = new GraphicsLayer();
        var infoTemplate = new InfoTemplate("${name}","${*}");
        pointLayer.setInfoTemplate(infoTemplate);
//CODE.................................
        pointLayer.clear();
        map.graphics.clear();
        for (var i = 0; i < features.length; i++) {
         
          if(!features[i].attributes['SDE.LineLayer.OBJECTID']) {
            pointLayer.add(features[i]);
          }
          else {
            map.graphics.add(features[i]);
          }
        }
        map.addLayer(pointLayer)

 

 

 

 

0 Kudos
1 Reply
LefterisKoumis
Regular Contributor

I had a similar need. I just created a feature layer with the queried features and add to the map. The AT will show that layer under a new tab and list only the queried features.

0 Kudos