<?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 FeatureTable Alternate for v4.7 in Esri India Questions</title>
    <link>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551834#M152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i will take a look similar example in version 4.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query/live/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query/live/index.html"&gt;Query features from a FeatureLayerView - 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it's not working getting error in google chrome browser as well as safari browser getting warning :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Crome error : query failed:&amp;nbsp; h {name: "esri.layers.graphics.QueryEngine", message: "Invalid query", details: undefined}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Safari error :&amp;nbsp;[esri.core.workers] – "This browser doesn't support ArrayBuffer transfer."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;error in details:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://recordit.co/e7h9u6U9MA"&gt;Error in details&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;what exact i'm trying to :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;in 3 ver. work but v4.7 it's not&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://recordit.co/ZUBprxzrx4"&gt;v3 working example&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;!important:&amp;nbsp; i can use this example in ionic 3 is&amp;nbsp;this possible and work?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2018 14:02:13 GMT</pubDate>
    <dc:creator>BhuminBhandari</dc:creator>
    <dc:date>2018-06-07T14:02:13Z</dc:date>
    <item>
      <title>FeatureTable Alternate for v4.7</title>
      <link>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551834#M152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i will take a look similar example in version 4.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query/live/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/featurelayerview-query/live/index.html"&gt;Query features from a FeatureLayerView - 4.7&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it's not working getting error in google chrome browser as well as safari browser getting warning :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Crome error : query failed:&amp;nbsp; h {name: "esri.layers.graphics.QueryEngine", message: "Invalid query", details: undefined}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Safari error :&amp;nbsp;[esri.core.workers] – "This browser doesn't support ArrayBuffer transfer."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;error in details:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://recordit.co/e7h9u6U9MA"&gt;Error in details&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;what exact i'm trying to :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;in 3 ver. work but v4.7 it's not&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="http://recordit.co/ZUBprxzrx4"&gt;v3 working example&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;!important:&amp;nbsp; i can use this example in ionic 3 is&amp;nbsp;this possible and work?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 14:02:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551834#M152</guid>
      <dc:creator>BhuminBhandari</dc:creator>
      <dc:date>2018-06-07T14:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable Alternate for v4.7</title>
      <link>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551835#M153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at this discussion: &lt;A href="https://community.esri.com/message/776993-how-to-show-attributes-table-in-api4"&gt;https://community.esri.com/message/776993-how-to-show-attributes-table-in-api4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551835#M153</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2018-06-07T15:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable Alternate for v4.7</title>
      <link>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551836#M154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@ken Buja thanks for reply this example is use&amp;nbsp;csvLayerView but i am using&amp;nbsp;FeatureLayer.&amp;nbsp; so anyone know how to implemented with&amp;nbsp;FeatureLayer. and also when i use my FeatureLayer url that it show me error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;query failed: &lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;DIV class=""&gt;&lt;DIV class="" data-expandable="true"&gt;&lt;DIV class=""&gt;&lt;SPAN class="" data-link-actor-id="server1.conn1.child1/obj3610"&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;SPAN class="" title="more…"&gt;…&lt;/SPAN&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;details&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;undefined&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;message&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;"Invalid query"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;name&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;"esri.layers.graphics.QueryEngine"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;AND when i use&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;DIV class="" data-expandable="false" style="background-color: #f6f6f6; font-weight: 400;"&gt;&lt;STRONG&gt;featureLayerView&lt;/STRONG&gt;.queryFeatures(query).then(function(graphics)&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false" style="background-color: #f6f6f6; font-weight: 400;"&gt;Error is&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;message&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;"Unsupported polygon intersection"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="" data-expandable="false"&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;name&lt;/SPAN&gt;&lt;SPAN class=""&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;"feature-store:unsupported-query"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;AND when i use&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;featureLayer&lt;/STRONG&gt;.queryFeatures(query).then(function(graphics)&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class="" data-expandable="false"&gt;Error is&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" data-link-actor-id="server1.conn2.child1/obj8473"&gt;TypeError: graphics.map is not a function Stack trace:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8"&amp;gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;Highlight features by geometry - 4.7&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt; var dojoConfig = {&lt;BR /&gt; has: {&lt;BR /&gt; "esri-featurelayer-webgl": 1&lt;BR /&gt; }&lt;BR /&gt; };&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F4.7%2Fesri%2Fcss%2Fmain.css" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/4.7/esri/css/main.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F4.7%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/4.7/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;style&amp;gt;&lt;BR /&gt; html,&lt;BR /&gt; body,&lt;BR /&gt; #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; overflow: hidden;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;#info,&lt;BR /&gt; #gridDisplay {&lt;BR /&gt; position: absolute;&lt;BR /&gt; bottom: 0;&lt;BR /&gt; left: 0;&lt;BR /&gt; height: 35%;&lt;BR /&gt; background-color: white;&lt;BR /&gt; border-color: grey;&lt;BR /&gt; width: 100%;&lt;BR /&gt; font-family: "Avenir Next W00", "Helvetica Neue", Helvetica, Arial, sans-serif;&lt;BR /&gt; font-size: 14px;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;#gridDisplay {&lt;BR /&gt; z-index: 80;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;#info {&lt;BR /&gt; z-index: 90;&lt;BR /&gt; font-size: 16px;&lt;BR /&gt; padding-left: 20px;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;#info * {&lt;BR /&gt; padding-right: 20px;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.info {&lt;BR /&gt; line-height: 20px;&lt;BR /&gt; padding-left: 5px ! important;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.dgrid-header,&lt;BR /&gt; .dgrid-header-row {&lt;BR /&gt; background-color: #eee;&lt;BR /&gt; color: #57585A;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.dgrid-row-even {&lt;BR /&gt; background-color: #F7F8F8;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.dgrid-row-odd {&lt;BR /&gt; background-color: #EFEFEF;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.dgrid-selected {&lt;BR /&gt; background: #B4DAF5;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;.dgrid-row {&lt;BR /&gt; border: none&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/WebMap",&lt;BR /&gt; "esri/views/MapView",&lt;BR /&gt; "esri/layers/CSVLayer",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/layers/GraphicsLayer",&lt;BR /&gt; "esri/widgets/Sketch/SketchViewModel",&lt;BR /&gt; "esri/Graphic",&lt;BR /&gt; "esri/config",&lt;BR /&gt; "esri/widgets/Legend",&lt;BR /&gt; "esri/widgets/Expand",&lt;BR /&gt; "dgrid/OnDemandGrid",&lt;BR /&gt; "dgrid/extensions/ColumnHider",&lt;BR /&gt; "dojo/store/Memory",&lt;BR /&gt; "dstore/legacy/StoreAdapter",&lt;BR /&gt; "dgrid/Selection",&lt;BR /&gt; "dojo/_base/declare",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ],&lt;BR /&gt; function(&lt;BR /&gt; Map,&lt;BR /&gt; WebMap, MapView, CSVLayer, FeatureLayer,GraphicsLayer,&lt;BR /&gt; SketchViewModel, Graphic, esriConfig, Legend, Expand,&lt;BR /&gt; OnDemandGrid, ColumnHider, Memory, StoreAdapter, Selection, declare&lt;BR /&gt; ) {&lt;/P&gt;&lt;P&gt;let map, view, csvLayer, csvLayerView,&lt;BR /&gt; sketchViewModel, highlight, grid,featureLayer,featureLayerView,graphics;&lt;BR /&gt; const gridDiv = document.getElementById("grid");&lt;BR /&gt; const infoDiv = document.getElementById("info");&lt;/P&gt;&lt;P&gt;// create new map, view and csvlayer&lt;BR /&gt; // setupTheView();&lt;BR /&gt; const popupTemplate = { // autocasts as new PopupTemplate()&lt;BR /&gt; title: "Marriage in NY, Zip Code: {ZIP}",&lt;BR /&gt; content: [{&lt;BR /&gt; type: "fields",&lt;BR /&gt; fieldInfos: [{&lt;BR /&gt; fieldName: "MARRIEDRATE",&lt;BR /&gt; label: "% Married",&lt;BR /&gt; format: {&lt;BR /&gt; places: 0,&lt;BR /&gt; digitSeparator: true&lt;BR /&gt; }&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "MARRIED_CY",&lt;BR /&gt; label: "Total Married",&lt;BR /&gt; format: {&lt;BR /&gt; places: 0,&lt;BR /&gt; digitSeparator: true&lt;BR /&gt; }&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "NEVMARR_CY",&lt;BR /&gt; label: "Never Married",&lt;BR /&gt; format: {&lt;BR /&gt; places: 0,&lt;BR /&gt; digitSeparator: true&lt;BR /&gt; }&lt;BR /&gt; }, {&lt;BR /&gt; fieldName: "DIVORCD_CY",&lt;BR /&gt; label: "Total Divorced",&lt;BR /&gt; format: {&lt;BR /&gt; places: 0,&lt;BR /&gt; digitSeparator: true&lt;BR /&gt; }&lt;BR /&gt; }]&lt;BR /&gt; }]&lt;BR /&gt; };&lt;BR /&gt; // Create the FeatureLayer using the popupTemplate&lt;BR /&gt; featureLayer = new FeatureLayer({&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fservices.arcgis.com%2FV6ZHFr6zdgNZuVG0%2FArcGIS%2Frest%2Fservices%2FNYCDemographics1%2FFeatureServer%2F0" rel="nofollow" target="_blank"&gt;https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/NYCDemographics1/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; outFields: ["*"],&lt;BR /&gt; popupTemplate: popupTemplate&lt;BR /&gt; });&lt;BR /&gt;//bhumin code start&lt;BR /&gt; map = new Map({&lt;BR /&gt; basemap: "dark-gray",&lt;BR /&gt; layers: [featureLayer]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; zoom:13,&lt;BR /&gt; center: [-73.950, 40.702],&lt;BR /&gt; highlightOptions: {&lt;BR /&gt; color: "#2B65EC",&lt;BR /&gt; fillOpacity: 0.4&lt;BR /&gt; },&lt;BR /&gt; padding: {&lt;BR /&gt; bottom: infoDiv.clientHeight // Same value as the #infoDiv height in CSS&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; // Create the PopupTemplate&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; //bhumin code end&lt;BR /&gt; const legendExpand = new Expand({&lt;BR /&gt; view: view,&lt;BR /&gt; content: new Legend({&lt;BR /&gt; view: view,&lt;BR /&gt; style: "card"&lt;BR /&gt; })&lt;BR /&gt; });&lt;BR /&gt; view.ui.add(legendExpand, "top-left");&lt;/P&gt;&lt;P&gt;view.popup.watch("visible", function(newValue) {&lt;BR /&gt; if (newValue) {&lt;BR /&gt; clearUpSelection();&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// create a new sketchviewmodel, setup it properties&lt;BR /&gt; // set up the click event for the select by polygon button&lt;BR /&gt; setUpSketchViewModel();&lt;BR /&gt; sketchViewModel.on("draw-complete", function(evt) {&lt;BR /&gt; console.log('drow cmplt');&lt;BR /&gt; // this polygon will be used to query features that intersect it&lt;BR /&gt; selectFeatures(evt.geometry);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;const gridFields = ["ZIP", "MARRIEDRATE", "MARRIED_CY"&lt;BR /&gt; ];&lt;/P&gt;&lt;P&gt;// create a new datastore for the on demandgrid&lt;BR /&gt; // will be used to display attributes of selected features&lt;BR /&gt; const dataStore = new StoreAdapter({&lt;BR /&gt; objectStore: new Memory({&lt;BR /&gt; idProperty: "ZIP"&lt;BR /&gt; })&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// create a grid with given columns once the csvlayer is loaded&lt;BR /&gt; featureLayer.when(function() {&lt;BR /&gt; // create a grid with columns specified in gridFields variable&lt;BR /&gt; createGrid(featureLayer.fields);&lt;/P&gt;&lt;P&gt;// get a reference the csvlayerview when it is ready. It will used to do&lt;BR /&gt; // client side queries when user draws polygon to select features&lt;BR /&gt; view.whenLayerView(featureLayer).then(function(layerView) {&lt;BR /&gt; featureLayerView = layerView;&lt;BR /&gt; });&lt;BR /&gt; })&lt;BR /&gt; .catch(errorCallback);&lt;/P&gt;&lt;P&gt;/****************************************************&lt;BR /&gt; * Selects features from the csv layer that intersect&lt;BR /&gt; * a polygon that user drew using sketch view model&lt;BR /&gt; ****************************************************/&lt;BR /&gt; function selectFeatures(geometry) {&lt;BR /&gt; console.log('ftgm',geometry);&lt;BR /&gt; view.graphics.removeAll();&lt;BR /&gt; if (featureLayerView) {&lt;/P&gt;&lt;P&gt;// create a query and set its geometry parameter to the&lt;BR /&gt; // polygon that was drawn on the view&lt;BR /&gt; var query = {&lt;BR /&gt; geometry: geometry,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; };&lt;BR /&gt; console.log('query',query);&lt;BR /&gt; // query graphics from the csv layer view. Geometry set for the query&lt;BR /&gt; // can be polygon for point features and only intersecting geometries are returned&lt;BR /&gt; featureLayer.queryFeatures(query).then(function(graphics) {&lt;BR /&gt; // if the grid div is displayed while query results does not&lt;BR /&gt; // return graphics then hide the grid div and show the instructions div&lt;BR /&gt; if (graphics.length &amp;gt; 0) {&lt;BR /&gt; // zoom to the extent of the polygon with factor 2&lt;BR /&gt; view.goTo(geometry.extent.expand(2));&lt;BR /&gt; gridDiv.style.zIndex = 90;&lt;BR /&gt; infoDiv.style.zIndex = 80;&lt;BR /&gt; document.getElementById("featureCount").innerHTML =&lt;BR /&gt; "&amp;lt;b&amp;gt;Showing attributes for " +&lt;BR /&gt; graphics.length.toString() + " features &amp;lt;/b&amp;gt;"&lt;BR /&gt; } else {&lt;BR /&gt; gridDiv.style.zIndex = 80;&lt;BR /&gt; infoDiv.style.zIndex = 90;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// remove existing highlighted features&lt;BR /&gt; if (highlight) {&lt;BR /&gt; highlight.remove();&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;// highlight query results&lt;BR /&gt; highlight = featureLayerView.highlight(graphics);&lt;BR /&gt; console.log('highlight',highlight);&lt;BR /&gt; // get the attributes to display in the grid&lt;BR /&gt; var data = graphics.map(function(feature, i) {&lt;BR /&gt; return Object.keys(feature.attributes)&lt;BR /&gt; .filter(function(key) {&lt;BR /&gt; // get fields that exist in the grid&lt;BR /&gt; return (gridFields.indexOf(key) !== -1);&lt;BR /&gt; })&lt;BR /&gt; // need to create key value pairs from the feature&lt;BR /&gt; // attributes so that info can be displayed in the grid&lt;BR /&gt; .reduce((obj, key) =&amp;gt; {&lt;BR /&gt; obj[key] = feature.attributes[key];&lt;BR /&gt; return obj;&lt;BR /&gt; }, {});&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// set the datastore for the grid using the&lt;BR /&gt; // attributes we got for the query results&lt;BR /&gt; dataStore.objectStore.data = data;&lt;BR /&gt; grid.set("collection", dataStore);&lt;BR /&gt; })&lt;BR /&gt; .catch(errorCallback);&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/************************************************&lt;BR /&gt; * fires when user clicks a row in the grid&lt;BR /&gt; * get the corresponding graphic and select it &lt;BR /&gt; *************************************************/&lt;BR /&gt; function selectFeatureFromGrid(event) {&lt;BR /&gt; // close view popup if it is open&lt;BR /&gt; view.popup.close();&lt;BR /&gt; // get the ObjectID value from the clicked row&lt;BR /&gt; var row = event.rows[0]&lt;BR /&gt; var id = row.data.__OBJECTID;&lt;/P&gt;&lt;P&gt;// setup a query by specifying objectIds&lt;BR /&gt; var query = {&lt;BR /&gt; objectIds: [parseInt(id)],&lt;BR /&gt; outFields: ["*"],&lt;BR /&gt; returnGeometry: true&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;// query the csvLayerView using the query set above&lt;BR /&gt; featureLayerView.queryFeatures(query).then(function(graphics) {&lt;BR /&gt; // remove all graphics to make sure no selected graphics&lt;BR /&gt; view.graphics.removeAll();&lt;/P&gt;&lt;P&gt;// create a new selected graphic&lt;BR /&gt; var selectedGraphic = new Graphic({&lt;BR /&gt; geometry: graphics[0].geometry,&lt;BR /&gt; symbol: {&lt;BR /&gt; type: "simple-marker",&lt;BR /&gt; style: "circle",&lt;BR /&gt; color: "orange",&lt;BR /&gt; size: "12px", // pixels&lt;BR /&gt; outline: { // autocasts as new SimpleLineSymbol()&lt;BR /&gt; color: [255, 255, 0],&lt;BR /&gt; width: 2 // points&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// add the selected graphic to the view&lt;BR /&gt; // this graphic corresponds to the row that was clicked&lt;BR /&gt; view.graphics.add(selectedGraphic);&lt;BR /&gt; })&lt;BR /&gt; .catch(errorCallback);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/************************************************&lt;BR /&gt; * Creates a new grid. Loops through poverty&lt;BR /&gt; * csvLayer's fields and creates grid columns&lt;BR /&gt; * Grid with selection and columnhider extensions&lt;BR /&gt; *************************************************/&lt;BR /&gt; function createGrid(fields) {&lt;BR /&gt; var columns = fields.filter(function(field, i) {&lt;BR /&gt; if (gridFields.indexOf(field.name) !== -1) {&lt;BR /&gt; return field;&lt;BR /&gt; }&lt;BR /&gt; }).map(function(field) {&lt;BR /&gt; if (field.name === "ZIP") {&lt;BR /&gt; return {&lt;BR /&gt; field: field.name,&lt;BR /&gt; label: field.name,&lt;BR /&gt; sortable: true,&lt;BR /&gt; hidden: true&lt;BR /&gt; };&lt;BR /&gt; } else {&lt;BR /&gt; return {&lt;BR /&gt; field: field.name,&lt;BR /&gt; label: field.alias,&lt;BR /&gt; sortable: true&lt;BR /&gt; };&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// create a new onDemandGrid with its selection and columnhider&lt;BR /&gt; // extensions. Set the columns of the grid to display attributes&lt;BR /&gt; // the hurricanes cvslayer&lt;BR /&gt; grid = new(declare([OnDemandGrid, Selection, ColumnHider]))({&lt;BR /&gt; columns: columns&lt;BR /&gt; }, "grid");&lt;/P&gt;&lt;P&gt;// add a row-click listener on the grid. This will be used&lt;BR /&gt; // to highlight the corresponding feature on the view&lt;BR /&gt; grid.on('dgrid-select', selectFeatureFromGrid);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/************************************************************************&lt;BR /&gt; * Sets up the sketchViewModel. When user clicks on the select by polygon&lt;BR /&gt; * button sketchViewModel.create() method is called with polygon param.&lt;BR /&gt; ************************************************************************/&lt;BR /&gt; function setUpSketchViewModel() {&lt;/P&gt;&lt;P&gt;// polygonGraphicsLayer will be used by the sketchviewmodel&lt;BR /&gt; // show the polygon being drawn on the view&lt;BR /&gt; var polygonGraphicsLayer = new GraphicsLayer();&lt;BR /&gt; map.add(polygonGraphicsLayer);&lt;/P&gt;&lt;P&gt;// add the select by polygon button the view&lt;BR /&gt; view.ui.add("select-by-polygon", "top-left");&lt;BR /&gt; var selectButton = document.getElementById("select-by-polygon");&lt;/P&gt;&lt;P&gt;// click event for the button&lt;BR /&gt; selectButton.addEventListener("click", function() {&lt;BR /&gt; clearUpSelection();&lt;BR /&gt; view.popup.close();&lt;BR /&gt; // ready to draw a polygon&lt;BR /&gt; sketchViewModel.create("polygon");&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// create a new sketch view model set its layer&lt;BR /&gt; sketchViewModel = new SketchViewModel({&lt;BR /&gt; view: view,&lt;BR /&gt; layer: polygonGraphicsLayer,&lt;BR /&gt; pointSymbol: {&lt;BR /&gt; type: "simple-marker",&lt;BR /&gt; color: [255, 255, 255, 0],&lt;BR /&gt; size: "1px",&lt;BR /&gt; outline: {&lt;BR /&gt; color: "gray",&lt;BR /&gt; width: 0&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function clearUpSelection() {&lt;BR /&gt; view.graphics.removeAll();&lt;BR /&gt; grid.clearSelection();&lt;BR /&gt; }&lt;BR /&gt; /******************************************************&lt;BR /&gt; * Sets up the view. WebMap with winkel III projection&lt;BR /&gt; * basemap and hurricanes CsvLayer is added to the view.&lt;BR /&gt; ******************************************************/&lt;BR /&gt; function setupTheView() {&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/*********************************************************&lt;BR /&gt; * Used to create uniques values for the csvlayer renderer&lt;BR /&gt; *********************************************************/&lt;BR /&gt; &lt;BR /&gt; function errorCallback(error) {&lt;BR /&gt; console.log("error:", error)&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&lt;BR /&gt; &amp;lt;div id="select-by-polygon" class="esri-widget-button esri-widget esri-interactive"&lt;BR /&gt; title="Select features by polygon"&amp;gt;&lt;BR /&gt; &amp;lt;span class="esri-icon-checkbox-unchecked"&amp;gt;&amp;lt;/span&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div id="info"&amp;gt;&lt;BR /&gt; &amp;lt;span class="info"&amp;gt;&lt;BR /&gt; &amp;lt;b&amp;gt;Instructions&amp;lt;/b&amp;gt;&lt;BR /&gt; &amp;lt;/span&amp;gt;&lt;BR /&gt; &amp;lt;br/&amp;gt;&lt;BR /&gt; &amp;lt;ul&amp;gt;&lt;BR /&gt; &amp;lt;li&amp;gt; Select features using select by polygon tool. Attributes of selected features&lt;BR /&gt; will be displayed here.&amp;lt;/li&amp;gt;&lt;BR /&gt; &amp;lt;br/&amp;gt;&lt;BR /&gt; &amp;lt;li&amp;gt; Click on a row to select a feature associated with it or click on a feature&lt;BR /&gt; to display its popup.&amp;lt;/li&amp;gt;&lt;BR /&gt; &amp;lt;ul&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;div id="gridDisplay"&amp;gt;&lt;BR /&gt; &amp;lt;span class="info" id="featureCount"&amp;gt;&amp;lt;/span&amp;gt;&lt;BR /&gt; &amp;lt;div id="grid"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 10:27:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-india-questions/featuretable-alternate-for-v4-7/m-p/551836#M154</guid>
      <dc:creator>BhuminBhandari</dc:creator>
      <dc:date>2018-06-08T10:27:29Z</dc:date>
    </item>
  </channel>
</rss>

