<?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 display a featuretable in React (class component) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-featuretable-in-react-class-component/m-p/1276014#M80773</link>
    <description>&lt;P&gt;I have this simple query and want to display the results to a feature table. However, the table never appears. I believe the root of the issue is the async. So, I tried using promises to no avail. I verified that the query works and I can see results on the map and the label about the number of features found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;getQuery = async (SQLwhere) =&amp;gt; {
    let thelayer = this.state.LayerObject;
    let query = thelayer.createQuery();
    query.where = SQLwhere;
    let thevalues = [];
    query.outFields = ["*"];
    query.returnDistinctValues = false;
    query.returnGeometry = true;
    thelayer
      .queryFeatures(query)

      .then((results) =&amp;gt; {
        numberofgraphics = results.features.length;
        const featureTable = new FeatureTable({
          view: this.state.jimuMapView.view,
          layer: thelayer,
          container: this.tableRef.current,
        });

        let graphics = results.features;
        numberofgraphics = graphics.length;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In html&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div&amp;gt;
            &amp;lt;Label
              id="results"
              size="sm"
              style={{ fontSize: 14, fontWeight: "bold", color: "red" }}
            &amp;gt;
              There are {numberofgraphics} feature(s) found.
            &amp;lt;/Label&amp;gt;
            &amp;lt;div
              id="tableDiv"
              style={{
                marginTop: "10px",
                marginLeft: "10px",
                width: "440px",
                height: "300px",
              }}
              ref={this.tableRef}
            /&amp;gt;
          &amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2023 15:44:39 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2023-04-06T15:44:39Z</dc:date>
    <item>
      <title>display a featuretable in React (class component)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-featuretable-in-react-class-component/m-p/1276014#M80773</link>
      <description>&lt;P&gt;I have this simple query and want to display the results to a feature table. However, the table never appears. I believe the root of the issue is the async. So, I tried using promises to no avail. I verified that the query works and I can see results on the map and the label about the number of features found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;getQuery = async (SQLwhere) =&amp;gt; {
    let thelayer = this.state.LayerObject;
    let query = thelayer.createQuery();
    query.where = SQLwhere;
    let thevalues = [];
    query.outFields = ["*"];
    query.returnDistinctValues = false;
    query.returnGeometry = true;
    thelayer
      .queryFeatures(query)

      .then((results) =&amp;gt; {
        numberofgraphics = results.features.length;
        const featureTable = new FeatureTable({
          view: this.state.jimuMapView.view,
          layer: thelayer,
          container: this.tableRef.current,
        });

        let graphics = results.features;
        numberofgraphics = graphics.length;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In html&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div&amp;gt;
            &amp;lt;Label
              id="results"
              size="sm"
              style={{ fontSize: 14, fontWeight: "bold", color: "red" }}
            &amp;gt;
              There are {numberofgraphics} feature(s) found.
            &amp;lt;/Label&amp;gt;
            &amp;lt;div
              id="tableDiv"
              style={{
                marginTop: "10px",
                marginLeft: "10px",
                width: "440px",
                height: "300px",
              }}
              ref={this.tableRef}
            /&amp;gt;
          &amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 15:44:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-a-featuretable-in-react-class-component/m-p/1276014#M80773</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-04-06T15:44:39Z</dc:date>
    </item>
  </channel>
</rss>

