<?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: How do you access the attribute of a feature layer in arcgis javascript api 3.2? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175182#M16262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had nested it in the updateDefinitionExpression(definitionExpression) function. So when I test alerts outside of array.map I get them when I click my filter button, but nothing happens inside function(gra). Is that what you're talking about?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;function updateDefinitionExpression(definitionExpression){ &lt;BR /&gt;//var definitionExpression = "HISAProjects_final_1262017_cs_2 = 'PELAGIC' AND FY = '2010'";&lt;BR /&gt;layer.setDefinitionExpression(definitionExpression);&lt;BR /&gt;console.log(definitionExpression);&lt;BR /&gt;map.infoWindow.hide(); &lt;BR /&gt; &lt;BR /&gt;alert("1");&lt;BR /&gt;array.map(layer.graphics, function(gra){&lt;BR /&gt;console.log(layer.graphics);&lt;BR /&gt;alert("2");&lt;BR /&gt;var projectNum = gra.attributes.HabitatData12_4_17_ProjectNum;&lt;BR /&gt;console.log(projectNum);&lt;BR /&gt;var currentID = $('.clickable').attr('id'); &lt;BR /&gt;console.log(currentID); &lt;BR /&gt;if (projectNum != currentID){&lt;BR /&gt;currentID.hide();&lt;BR /&gt;}&lt;BR /&gt;else{&lt;BR /&gt;alert("all the same");&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;} //end updateDefinitionExpression function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2018 14:49:04 GMT</pubDate>
    <dc:creator>CaraMayo2</dc:creator>
    <dc:date>2018-04-23T14:49:04Z</dc:date>
    <item>
      <title>How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175176#M16256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I feel like I should be able to find the answer to this question, but I haven't been successful so far so I thought I would reach out for some help... I am making a web map similar in style to the &lt;A href="http://storymaps.arcgis.com/en/app-list/shortlist/"&gt;Shortlist story map&lt;/A&gt;. There is a map with a layer that contains&amp;nbsp;the locations of projects around the US (polygons) and a sidebar of cards. Each card is supposed to correspond to a project on the map. The map also has a filter tool that allows you to query the feature layer for a couple attributes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to connect my cards to their corresponding feature on the map so that when a person queries the map, they see only the polygons and corresponding cards. If a polygon is hidden due to the filter request, its corresponding card should&amp;nbsp;hide too. Each card's id is the project's Project Number and each project has a ProjectNum field that contains the project number. The problem is, I can't&amp;nbsp;figure out how to access the Project Number of each feature. How do you do this?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/map",&lt;BR /&gt; "esri/layers/FeatureLayer",&lt;BR /&gt; "esri/dijit/PopupTemplate",&lt;BR /&gt; "esri/dijit/Legend",&lt;BR /&gt; "dojo/domReady!"&lt;BR /&gt; ], function(&lt;BR /&gt; Map, &lt;BR /&gt; FeatureLayer, &lt;BR /&gt; PopupTemplate, &lt;BR /&gt; Legend&lt;BR /&gt; ) {&lt;/P&gt;&lt;P&gt;var map = new Map("viewDiv", {&lt;BR /&gt; basemap: "gray-vector",&lt;BR /&gt; center: [ -85.20127, 35.12355 ],&lt;BR /&gt; zoom: 1&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;// Add layer to the map&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var serviceUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fservices2.arcgis.com%2FC8EMgrsFcRFL6LrL%2Farcgis%2Frest%2Fservices%2FHISAProjects_WFL1%2FFeatureServer%2F0%3Ftoken%3DYpbF4nsIB3GuSbWIhgwXbWczDf8K5hPtyHvhd9tOsM2DH_H5h6XtKDa-QnCwSgFbuRM9Ys49M5u3Q6kxshkFwT3b1piPsaqqYDliPnZ3iHXmT6mt0vul77BFD2TtdU-K_11qvpDFZ8nrt4dSKnD_q1D-G7aV97yTAsYdcD4-iUiMhEZqc8IAErCkuf86rXdOZXXeOdZuHNP8Yr0S5KY-gf3k7LIt6XalyiZPyZ2439c" rel="nofollow" target="_blank"&gt;https://services2.arcgis.com/C8EMgrsFcRFL6LrL/arcgis/rest/services/HISAProjects_WFL1/FeatureServer/0?token=YpbF4nsIB3GuSbWIhgwXbWczDf8K5hPtyHvhd9tOsM2DH_H5h6XtKDa-QnCwSgFbuRM9Ys49M5u3Q6kxshkFwT3b1piPsaqqYDliPnZ3iHXmT6mt0vul77BFD2TtdU-K_11qvpDFZ8nrt4dSKnD_q1D-G7aV97yTAsYdcD4-iUiMhEZqc8IAErCkuf86rXdOZXXeOdZuHNP8Yr0S5KY-gf3k7LIt6XalyiZPyZ2439c&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt; var layer = new FeatureLayer(serviceUrl, {&lt;BR /&gt; outFields: [ "FY", "HISAProjects_final_1262017_cs_2", "HISAProjects_final_1262017_csv1", "HISAProjects_final_1262017_cs_4", "HISAProjects_final_1262017_cs_5", "HISAProjects_final_1262017_csv_", "HISAProjects_final_1262017_cs_3", "HISAProjects_final_1262017_cs_1", "HabitatData12_4_17_ProjectNum"],&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt; infoTemplate: new PopupTemplate({&lt;BR /&gt; title: "{HISAProjects_final_1262017_cs_4}",&lt;BR /&gt; description: "&amp;lt;br /&amp;gt;Lead PI: {HISAProjects_final_1262017_cs_5}"&lt;BR /&gt; + "&amp;lt;br /&amp;gt;Region: {HISAProjects_final_1262017_csv_}"&lt;BR /&gt; + "&amp;lt;br /&amp;gt;Year: {FY}"&lt;BR /&gt; + "&amp;lt;br /&amp;gt;Primary Habitat Type: {HISAProjects_final_1262017_cs_2}"&lt;BR /&gt; + "&amp;lt;br /&amp;gt;Secondary Habitat Type: {HISAProjects_final_1262017_cs_3}"&lt;BR /&gt; + "&amp;lt;br /&amp;gt;Distance from shore: {HISAProjects_final_1262017_csv1}"&lt;BR /&gt; + "&amp;lt;br /&amp;gt;Secondary Distance from shore: {HISAProjects_final_1262017_cs_1}"&lt;/P&gt;&lt;P&gt;//&lt;BR /&gt; // "Learn more.." link connected to individual main-areaCard info windows&lt;BR /&gt; &lt;BR /&gt; })&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; map.addLayer(layer);&lt;BR /&gt; var legend = new Legend({&lt;BR /&gt; map: map,&lt;BR /&gt; layerInfos: [{&lt;BR /&gt; layer: layer,&lt;BR /&gt; title: "Habitat Type"&lt;BR /&gt; }]&lt;BR /&gt; }, "legendDiv");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// "Global" Variables&lt;BR /&gt; var filter1 = document.getElementById("filterhabitat");&lt;BR /&gt; var filter2 = document.getElementById("filterlocation");&lt;BR /&gt; var filter3 = document.getElementById("filteryear"); &lt;BR /&gt; var button = document.getElementById("button");&lt;/P&gt;&lt;P&gt;map.on("load", function(evt){&lt;BR /&gt; legend.startup();&lt;BR /&gt; button.addEventListener("click", function(e){&lt;BR /&gt; // console.log(filter1.options[filter1.selectedIndex].value);&lt;BR /&gt; // console.log(filter2.options[filter2.selectedIndex].value);&lt;BR /&gt; // console.log(filter3.options[filter3.selectedIndex].value);&lt;BR /&gt; habitatValue = filter1.options[filter1.selectedIndex].value;&lt;BR /&gt; distanceValue = filter2.options[filter2.selectedIndex].value;&lt;BR /&gt; yearValue = filter3.options[filter3.selectedIndex].value;&lt;BR /&gt; pushValues(habitatValue, distanceValue, yearValue);&lt;BR /&gt; &lt;BR /&gt; });&lt;BR /&gt; }); //end of map event function&lt;/P&gt;&lt;P&gt;function pushValues (habitatValue, distanceValue, yearValue){&lt;BR /&gt; var expressionArray = [];&lt;/P&gt;&lt;P&gt;if (habitatValue) {&lt;BR /&gt; var str = `HISAProjects_final_1262017_cs_2 = '${habitatValue}'`; &lt;BR /&gt; expressionArray.push(str);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; if (distanceValue) {&lt;BR /&gt; var str = `HISAProjects_final_1262017_csv1 = '${distanceValue}'`;&lt;BR /&gt; expressionArray.push(str);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if (yearValue) {&lt;BR /&gt; var str = `FY = '${yearValue}'`;&lt;BR /&gt; expressionArray.push(str);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; console.log(expressionArray);&lt;/P&gt;&lt;P&gt;var definitionExpression = expressionArray.join(' AND ');&lt;/P&gt;&lt;P&gt;updateDefinitionExpression(definitionExpression);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function updateDefinitionExpression(definitionExpression){ &lt;BR /&gt; //var definitionExpression = "HISAProjects_final_1262017_cs_2 = 'PELAGIC' AND FY = '2010'";&lt;BR /&gt; layer.setDefinitionExpression(definitionExpression);&lt;BR /&gt; console.log(definitionExpression);&lt;BR /&gt; map.infoWindow.hide();&lt;BR /&gt; &lt;BR /&gt; function connectIds(){&lt;/P&gt;&lt;P&gt;projectNum = $('.clickable').attr('id');&lt;BR /&gt; console.log(projectNum);&lt;BR /&gt; //retrieve ProjectNum for feature&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;} //end updateDefinitionExpression function&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; });// end Function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Apr 2018 03:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175176#M16256</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-21T03:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175177#M16257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So you can loop through the layers features to get the project numbers from each of the features that qualify bsed on the definition query.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;require&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"dojo/_base/array"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;array&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; array&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; projectNum &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;HabitatData12_4_17_ProjectNum&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;//now do something with that features project number&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;//like filter your cards&lt;/SPAN&gt;
&amp;nbsp; &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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:02:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175177#M16257</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T09:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175178#M16258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! I'm having trouble accessing the id number that is supposed to be stored in the projectNum variable. I can see how you are getting to the id number when I look at layer.graphics attributes, but nothing happens when I console.log(projectNum). Do you know why this is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array.map(layer.graphics, function(gra){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var projectNum = gra.attributes.HabitatData12_4_17_ProjectNum;&lt;BR /&gt; &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var currentID = $('.clickable').attr('id'); &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (projectNum != currentID){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;currentID.hide();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert("all the same");&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 05:14:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175178#M16258</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-23T05:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175179#M16259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;So what happen if you add this line to that code?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;array&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; projectNum &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;HabitatData12_4_17_ProjectNum&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;projectNum&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; currentID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;$&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.clickable'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;attr&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;projectNum &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; currentID&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentID&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hide&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;alert&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"all the same"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:02:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175179#M16259</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T09:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175180#M16260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't get anything. Nothing logged in the console, no alerts. It's like those lines of code don't exist. But when I use console.log(layer.graphics), I see the array and I can get to where the attributes are.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 14:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175180#M16260</guid>
      <dc:creator>CaraMayo2</dc:creator>
      <dc:date>2018-04-23T14:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175181#M16261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;So it sounds like your array loop is happening before the layer is loaded. You need to delay your loop until you have the layer load event fired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 14:29:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175181#M16261</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-23T14:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175182#M16262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had nested it in the updateDefinitionExpression(definitionExpression) function. So when I test alerts outside of array.map I get them when I click my filter button, but nothing happens inside function(gra). Is that what you're talking about?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;function updateDefinitionExpression(definitionExpression){ &lt;BR /&gt;//var definitionExpression = "HISAProjects_final_1262017_cs_2 = 'PELAGIC' AND FY = '2010'";&lt;BR /&gt;layer.setDefinitionExpression(definitionExpression);&lt;BR /&gt;console.log(definitionExpression);&lt;BR /&gt;map.infoWindow.hide(); &lt;BR /&gt; &lt;BR /&gt;alert("1");&lt;BR /&gt;array.map(layer.graphics, function(gra){&lt;BR /&gt;console.log(layer.graphics);&lt;BR /&gt;alert("2");&lt;BR /&gt;var projectNum = gra.attributes.HabitatData12_4_17_ProjectNum;&lt;BR /&gt;console.log(projectNum);&lt;BR /&gt;var currentID = $('.clickable').attr('id'); &lt;BR /&gt;console.log(currentID); &lt;BR /&gt;if (projectNum != currentID){&lt;BR /&gt;currentID.hide();&lt;BR /&gt;}&lt;BR /&gt;else{&lt;BR /&gt;alert("all the same");&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;} //end updateDefinitionExpression function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 14:49:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175182#M16262</guid>
      <dc:creator>CaraMayo2</dc:creator>
      <dc:date>2018-04-23T14:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175183#M16263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;So you never get alert 2? You likely need to wait for the update-end event on the layer so that you know the layer has the definition applied and that the layer.graphics is populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 15:11:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175183#M16263</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-23T15:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175184#M16264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct. I've been trying to figure out what the problem is and I'm beginning to wonder if there's something wrong with my feature layer. I can access layer.graphics in the updateDefinitionExpression (i.e. I can run my filter and the contents of layer.graphics are the remaining features), however, when I try to access the features before the updateDefinitionExpression function, I get an empty array. Is that supposed to happen? In other words, I can access my layer variable and under "Graphics" I see the 32 features that I have, but when I log layer.graphics I get nothing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried array.map(function(evt){}); on a simple array that made and it worked fine there. For some reason, I can't access the values of my fields.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 18:38:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175184#M16264</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-23T18:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175185#M16265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;So after you set your definition on the layer do you see graphics draw on the screen that match your definition?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 18:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175185#M16265</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-23T18:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175186#M16266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the graphics that appear on the screen after the filter function match what I would expect to be on the screen.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 19:22:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175186#M16266</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-23T19:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175187#M16267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Any possibility of sharing your full code for review?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 23:24:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175187#M16267</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-04-23T23:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175188#M16268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The zip file was too big, but I added my&amp;nbsp;html, js, and css files that should give a good picture. I don't know if you'll be able to see the web map though because it can't go public yet.&lt;/P&gt;&lt;P&gt;Let me know if this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 23:32:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175188#M16268</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-23T23:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175189#M16269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I when I use this in your code I do get the project number:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;updateDefinitionExpression&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;definitionExpression&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"layer1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;//var definitionExpression = "HISAProjects_final_1262017_cs_2 = 'PELAGIC' AND FY = '2010'";&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setDefinitionExpression&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;definitionExpression&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'update-end'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"this is the project number: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;HabitatData12_4_17_ProjectNum&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hide&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//end updateDefinitionExpression function&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:02:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175189#M16269</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T09:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175190#M16270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! It worked for me too &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you used layer.on instead of array.map and I'm not sure where 'update-end' is coming from. Could you explain what you did differently?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 14:18:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175190#M16270</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-24T14:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175191#M16271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;As I mentioned earlier you needed to wait for the layer to update to using the new definition you applied before trying to get the graphics. So using layer.on and the "update-end" event on the layer we are sure that the layer is updated. My example will get the first graphic and log the project number to the console. If you need to loop through all the project numbers then you need something more like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;updateDefinitionExpression&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;definitionExpression&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"layer1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;//var definitionExpression = "HISAProjects_final_1262017_cs_2 = 'PELAGIC' AND FY = '2010'";&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setDefinitionExpression&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;definitionExpression&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'update-end'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;evt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; projNumArr &lt;SPAN class="operator 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="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; projNumArr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;push&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;HabitatData12_4_17_ProjectNum&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"these is the project number: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; projNumArr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;join&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string 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="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;infoWindow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hide&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//end updateDefinitionExpression function&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:02:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175191#M16271</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T09:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you access the attribute of a feature layer in arcgis javascript api 3.2?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175192#M16272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 14:57:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-access-the-attribute-of-a-feature-layer/m-p/175192#M16272</guid>
      <dc:creator>CaraMayo</dc:creator>
      <dc:date>2018-04-24T14:57:21Z</dc:date>
    </item>
  </channel>
</rss>

