<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Display only selected records on feature table. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203952#M78334</link>
    <description>&lt;P&gt;Ok, I think I know what's happening with the polygons. I think what is happening here, is since the sample shows using the FeatureLayerView, it only queries data that has been downloaded and visible on the map, which makes sense.&lt;/P&gt;&lt;P&gt;However, if a polygon (or a polyline) is smaller than a pixel, as in, you couldn't see it anyway, it won't technically be in the LayerView since it's not drawn due to quantization in the request. This doesn't happen with points, because a point can always fit in a pixel.&lt;/P&gt;&lt;P&gt;If you update your demo to use&amp;nbsp;&lt;EM&gt;fLayer.queryFeatures(query)&lt;/EM&gt; it should work, and properly filter the table.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 20:32:41 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2022-08-17T20:32:41Z</dc:date>
    <item>
      <title>Display only selected records on feature table.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203853#M78327</link>
      <description>&lt;P&gt;I followed the script to display only the selected records on the feature table after you select by geometry as it is&amp;nbsp;shown at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=highlight-features-by-geometry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, the featuretable does not filter out the unselected records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function selectFeatures(geometry) {
  if (featureLayerView) {
    // create a query and set its geometry parameter to the
    // rectangle that was drawn on the view
    const query = {
      geometry: geometry,
      outFields: ["*"]
    };

    // query graphics from the csv layer view. Geometry set for the query
    // can be polygon for point features and only intersecting geometries are returned
    featureLayerView
      .queryFeatures(query)
      .then((results) =&amp;gt; {
        const graphics = results.features;
        resultFeatures = graphics;
        if (results.features.length === 0) {
          clearSelection();
        } else {
          // pass in the query results to the table by calling its selectRows method.
          // This will trigger FeatureTable's selection-change event
          // where we will be setting the feature effect on the csv layer view
          console.log(featureTable)
          featureTable.filterGeometry = geometry;
          featureTable.selectRows(results.features);        
        }
      })
      .catch(errorCallback);
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LefterisKoumis_0-1660756921630.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48847iF4181678E412F4F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LefterisKoumis_0-1660756921630.png" alt="LefterisKoumis_0-1660756921630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 17:27:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203853#M78327</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2022-08-17T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Display only selected records on feature table.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203872#M78329</link>
      <description>&lt;P&gt;Can you provide a repro in codepen or something? Not sure what is different in your app versus the working sample.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 17:53:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203872#M78329</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-08-17T17:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Display only selected records on feature table.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203930#M78332</link>
      <description>&lt;P&gt;It seems it occurs when you don't use a point layer. Why?&lt;/P&gt;&lt;P&gt;I modified the sample code from esri and I have two layers. If set the point layer active (#74), upon selection by geometry the feature table shows only the selected features. However, if you set the polygon layer active (#72 the feature table still shows all records.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/lkoumis1/pen/RwMEGBq?editors=1001" target="_blank"&gt;https://codepen.io/lkoumis1/pen/RwMEGBq?editors=1001&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 20:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203930#M78332</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2022-08-17T20:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display only selected records on feature table.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203952#M78334</link>
      <description>&lt;P&gt;Ok, I think I know what's happening with the polygons. I think what is happening here, is since the sample shows using the FeatureLayerView, it only queries data that has been downloaded and visible on the map, which makes sense.&lt;/P&gt;&lt;P&gt;However, if a polygon (or a polyline) is smaller than a pixel, as in, you couldn't see it anyway, it won't technically be in the LayerView since it's not drawn due to quantization in the request. This doesn't happen with points, because a point can always fit in a pixel.&lt;/P&gt;&lt;P&gt;If you update your demo to use&amp;nbsp;&lt;EM&gt;fLayer.queryFeatures(query)&lt;/EM&gt; it should work, and properly filter the table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 20:32:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-only-selected-records-on-feature-table/m-p/1203952#M78334</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-08-17T20:32:41Z</dc:date>
    </item>
  </channel>
</rss>

