<?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: Not all attributes for graphic(s) are returned when click FeatureLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1365287#M83235</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53756"&gt;@UndralBatsukh&lt;/a&gt;&amp;nbsp;ment to write (use asterisk to represent "all fields")&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;outFields: ["*"],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2024 11:15:20 GMT</pubDate>
    <dc:creator>ViktorSafar</dc:creator>
    <dc:date>2024-01-02T11:15:20Z</dc:date>
    <item>
      <title>Not all attributes for graphic(s) are returned when click FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1364245#M83204</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I create a FeatureLayer&amp;nbsp;&lt;SPAN&gt;from an array of client-side features,&amp;nbsp;This is how that looks like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function FeatureLayer(){
const graphic = new Graphic({
geometry: {
type: 'point',
longitude: -118.80657463861,
latitude: 34.0005930608889
},
symbol:{
type: "simple-marker",
color: [226, 119, 40], // Orange
outline: {
color: [255, 255, 255], // White
width: 1
}
},
attributes: {id: '123'},
})
const featureLayer= new FeatureLayer({
source: [graphic],
objectIdField: "OBJECTID",
outfields: ["id"],
fields: [{
name: "OBJECTID",
type: "oid"
}, {
name: "id",
type: "string"
}],
renderer: {
type: "simple",
symbol:{
type: "simple-marker",
color: [226, 119, 40], // Orange
outline: {
color: [255, 255, 255], // White
width: 1
}
},
}
});
map.add(featureLayer);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then I&amp;nbsp;Listen the click event,log the&amp;nbsp;&lt;SPAN&gt;attributes,but it only has&amp;nbsp;&lt;SPAN class=""&gt;OBJECTID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="csyuserchen_0-1703487741423.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89943iC3FED0B95AC3DC80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="csyuserchen_0-1703487741423.png" alt="csyuserchen_0-1703487741423.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.on('click', (event) =&amp;gt; {
        view.hitTest(event).then((response) =&amp;gt; {
          console.log(response.results[0].graphic).attributes
        })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my code in codesandbox:&lt;A href="https://codesandbox.io/p/sandbox/arcgis-featurelayer-attributes-2hnm7d?file=%2Findex.html%3A50%2C12" target="_self"&gt;https://codesandbox.io/p/sandbox/arcgis-featurelayer-attributes-2hnm7d?file=%2Findex.html%3A50%2C12&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Dec 2023 07:29:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1364245#M83204</guid>
      <dc:creator>csyuserchen</dc:creator>
      <dc:date>2023-12-25T07:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Not all attributes for graphic(s) are returned when click FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1364885#M83223</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;FeatureLayer's outFields property has a wrong casing in your code. Please change it from&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;outfields: ["id"],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;to&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;outFields: ["id"],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then it should work as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 22:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1364885#M83223</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-12-28T22:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Not all attributes for graphic(s) are returned when click FeatureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1365287#M83235</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/53756"&gt;@UndralBatsukh&lt;/a&gt;&amp;nbsp;ment to write (use asterisk to represent "all fields")&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;outFields: ["*"],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 11:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/not-all-attributes-for-graphic-s-are-returned-when/m-p/1365287#M83235</guid>
      <dc:creator>ViktorSafar</dc:creator>
      <dc:date>2024-01-02T11:15:20Z</dc:date>
    </item>
  </channel>
</rss>

