<?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 How to get attributes of Web Map feature which user clicked on in custom widget in ArcGIS Experience Builder application? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288416#M81130</link>
    <description>&lt;P&gt;I have an ArcGIS Experience Builder application, which uses a Web Map I host in ArcGIS online. This Web Map contains a feature layer with several attributes, and I can use these in Experience Builder with the stock widgets (i.e. updating dynamic text based on attributes when the user clicks on a certain feature). I am now trying to write a custom widget using Jimu which displays some text when the user clicks on a feature:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      jmv.view.on('click', evt =&amp;gt; {
        const point: Point = jmv.view.toMap({
          x: evt.x,
          y: evt.y
        })

        jmv.view.hitTest(evt).then((response) =&amp;gt; {
          console.log(response.results[0].graphic.attributes)
          // Do things with the attributes of the clicked feature
        })
      })&lt;/LI-CODE&gt;&lt;P&gt;However, this code only returns the `ObjectID` attribute of the clicked feature, and none of the others. How do I access the rest of the features?&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 23:09:44 GMT</pubDate>
    <dc:creator>work2023</dc:creator>
    <dc:date>2023-05-11T23:09:44Z</dc:date>
    <item>
      <title>How to get attributes of Web Map feature which user clicked on in custom widget in ArcGIS Experience Builder application?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288416#M81130</link>
      <description>&lt;P&gt;I have an ArcGIS Experience Builder application, which uses a Web Map I host in ArcGIS online. This Web Map contains a feature layer with several attributes, and I can use these in Experience Builder with the stock widgets (i.e. updating dynamic text based on attributes when the user clicks on a certain feature). I am now trying to write a custom widget using Jimu which displays some text when the user clicks on a feature:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      jmv.view.on('click', evt =&amp;gt; {
        const point: Point = jmv.view.toMap({
          x: evt.x,
          y: evt.y
        })

        jmv.view.hitTest(evt).then((response) =&amp;gt; {
          console.log(response.results[0].graphic.attributes)
          // Do things with the attributes of the clicked feature
        })
      })&lt;/LI-CODE&gt;&lt;P&gt;However, this code only returns the `ObjectID` attribute of the clicked feature, and none of the others. How do I access the rest of the features?&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 23:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288416#M81130</guid>
      <dc:creator>work2023</dc:creator>
      <dc:date>2023-05-11T23:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get attributes of Web Map feature which user clicked on in custom widget in ArcGIS Experience Builder application?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288591#M81139</link>
      <description>&lt;P&gt;You have to add the fields you want to see in the feature layer's &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#outFields" target="_self"&gt;outFields&lt;/A&gt; property. It defaults to null, only returning the Object ID field&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 14:21:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288591#M81139</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-05-12T14:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get attributes of Web Map feature which user clicked on in custom widget in ArcGIS Experience Builder application?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288671#M81143</link>
      <description>&lt;P&gt;Excellent, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 17:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-attributes-of-web-map-feature-which/m-p/1288671#M81143</guid>
      <dc:creator>work2023</dc:creator>
      <dc:date>2023-05-12T17:23:30Z</dc:date>
    </item>
  </channel>
</rss>

