<?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: Getting layer data to display in Attribute Table in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869748#M12674</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case anyone else has a similar problem, this is how I got it to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When creating the graphic, set all of the attributes as well:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; polyline &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;context&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esriJS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polyline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polylineJson&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; routeInfoTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;context&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esriJS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InfoTemplate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Route Name:'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; routeAttributes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            ObjectID&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ObjectID&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            Name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            ViolatedConstraints&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ViolatedConstraints&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            OrderCount&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OrderCount&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            TotalCost&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TotalCost
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create a layer definition and use that to create a featureCollection in order to create a featureLayer. Add the layer to the map:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layerDefinition &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Route "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            geometryType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometryType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            fields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; routeFields&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fields   &lt;SPAN class="comment token"&gt;//Stored externally, they set the column headers&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureCollection &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            layerDefinition&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; layerDefinition&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            featureSet&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;// Ok for this to be null since attributes were set above&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureCollection&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Routing Solution '&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            showLabels&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

          featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polylineGraphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Web AppBuilder application the layer info will be available to the Attribute Table widget. Also, when testing check in the Attribute Table widget if the Filter By Map Extent button is selected, as that can prevent values from a layer from displaying in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:50:20 GMT</pubDate>
    <dc:creator>JohnHovanec</dc:creator>
    <dc:date>2021-12-12T10:50:20Z</dc:date>
    <item>
      <title>Getting layer data to display in Attribute Table</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869744#M12670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building a custom widget and am trying to add a layer to the Attributes Table. I believe my layer is successfully being added to the Attributes Table as I can see the column headers change for the layer when added. My issue is that I'm not seeing any data from my layer show-up in the Attributes Table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where does the Attribute Table pull the data from for a layer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a sample of how I am creating the FeatureLayer that will be added to the table:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; const polyline = new Polyline(polylineJson);
 var routeInfoTemplate = new InfoTemplate('Route Name:' + route.attributes.Name);
 var routeAttributes = {
   RouteName: route.attributes.Name,
   OrderCount: route.attributes.OrderCount,
 };

 const polylineGraphic = new context.esriJS.Graphic({
   'geometry': polyline,
   'symbol': { "color": colorArr&lt;I&gt;, "width": 1, "type": "esriSLS", "style": "esriSLSSolid" },
   'attributes': routeAttributes,
   'infoTemplate': routeInfoTemplate
 });
&lt;CODE&gt;
var layerDefinition = {
  "name": "SHA Test " + route.attributes.Name,
  "geometryType": "esriGeometryPolyline",
  "fields": [{
  "name": "Name",
  "alias": "RouteName",
  "type": "esriFieldTypeString"
 }, {
  "name": "OrderCount",
  "alias": "Order Count",
  "type": "esriFieldTypeString"
 }]
 }&lt;/CODE&gt;
&lt;CODE&gt;
 // Define the featureCollection
 var featureCollection = {
   layerDefinition: layerDefinition,
   featureSet:&amp;nbsp;routes.attributes&amp;nbsp; &amp;nbsp;// routes are returned from the Rest Api
 }

&amp;nbsp;// Define the featureLayer
 var featureLayer = new FeatureLayer(featureCollection, {
 id: 'Routing Solution ' + route.attributes.Name,
 showLabels: true
 });&lt;/CODE&gt;

featureLayer.add(polylineGraphic);
map.addLayer(featureLayer);&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to Esri APIs, so if I'm missing something obvious please feel free to point it out. I feel like this is probably very simple, but I appreciate any help in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 17:01:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869744#M12670</guid>
      <dc:creator>JohnHovanec</dc:creator>
      <dc:date>2021-12-12T17:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting layer data to display in Attribute Table</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869745#M12671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; These are the lines that give me pause:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; &lt;SPAN class="comment token"&gt;// Define the featureCollection&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureCollection &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
   layerDefinition&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; layerDefinition&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
   featureSet&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; routes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes   &lt;SPAN class="comment token"&gt;// routes are returned from the Rest Api&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is the routes object an array of graphics? You mention in the code comment that routes are returned from the Rest Api. If routes is the featureset returned from a QueryTask then you should be passing just route and not route.attributes to the featureSet property.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869745#M12671</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting layer data to display in Attribute Table</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869746#M12672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;The route object is returned from the Vehicle Routing Solution service&amp;nbsp;as feature set. When I try to send in the full route object I get errors about features being undefined. That led me to try&amp;nbsp;a style similar to what is in&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/fl_featureCollection.html" title="https://developers.arcgis.com/javascript/3/jssamples/fl_featureCollection.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Feature collection | ArcGIS API for JavaScript 3.27&lt;/A&gt;.&amp;nbsp;That got me past the feature error but&amp;nbsp;to a new error of 'Converting circular structure to JSON.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My featureLayer creation currently looks like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureCollection &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; 
  layerDefinition&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; layerDefinition&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
  featureSet&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; 
    features&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; config&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fetchedRoute&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
    geometryType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; config&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fetchedRoute&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometryType   
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;context&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esriJS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureCollection&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Routing Solution '&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; showLabels&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other thoughts or suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:50:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869746#M12672</guid>
      <dc:creator>JohnHovanec</dc:creator>
      <dc:date>2021-12-12T10:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting layer data to display in Attribute Table</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869747#M12673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;'Converting circular structure to JSON.' means is that you are setting a property (of something) to the object itself thus creating a circular reference. I don't see the issue in the code you have posted here so it is hard to say.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 18:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869747#M12673</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-03-20T18:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting layer data to display in Attribute Table</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869748#M12674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case anyone else has a similar problem, this is how I got it to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When creating the graphic, set all of the attributes as well:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; polyline &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;context&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esriJS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polyline&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polylineJson&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; routeInfoTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;context&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;esriJS&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InfoTemplate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Route Name:'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; routeAttributes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            ObjectID&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ObjectID&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            Name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            ViolatedConstraints&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ViolatedConstraints&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            OrderCount&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OrderCount&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            TotalCost&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TotalCost
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create a layer definition and use that to create a featureCollection in order to create a featureLayer. Add the layer to the map:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layerDefinition &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Route "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            geometryType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometryType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            fields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; routeFields&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fields   &lt;SPAN class="comment token"&gt;//Stored externally, they set the column headers&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureCollection &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            layerDefinition&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; layerDefinition&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            featureSet&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;// Ok for this to be null since attributes were set above&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureCollection&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Routing Solution '&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; route&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            showLabels&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

          featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;polylineGraphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Web AppBuilder application the layer info will be available to the Attribute Table widget. Also, when testing check in the Attribute Table widget if the Filter By Map Extent button is selected, as that can prevent values from a layer from displaying in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:50:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/getting-layer-data-to-display-in-attribute-table/m-p/869748#M12674</guid>
      <dc:creator>JohnHovanec</dc:creator>
      <dc:date>2021-12-12T10:50:20Z</dc:date>
    </item>
  </channel>
</rss>

