<?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 to access to the related layer with triggered action in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1096373#M74599</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to access to attribute table with the event? Where can I get the properties of an event? I could not find any resource.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to implement an action that opening attribute table but can not do it&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;alert(event.item.layer.isTable)&lt;/LI-CODE&gt;&lt;P&gt;returns false&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 14:10:38 GMT</pubDate>
    <dc:creator>Amadeus111</dc:creator>
    <dc:date>2021-09-08T14:10:38Z</dc:date>
    <item>
      <title>How to access to the related layer with triggered action</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1094596#M74512</link>
      <description>&lt;P&gt;I am trying to implement an action that zooms to layer's full entent. Is there a way to access the related layer?&lt;/P&gt;&lt;P&gt;I found some info:&amp;nbsp;&lt;A href="https://totalapis.github.io/api-reference/esri-widgets-LayerList-ListItem.html" target="_blank" rel="noopener"&gt;https://totalapis.github.io/api-reference/esri-widgets-LayerList-ListItem.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but could not implement it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, I am trying to access the layer shown with the arrow mark when actions (3 dots) triggered&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OguzSariyildiz_0-1630524181350.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22224i8B1B6FE295A53E57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="OguzSariyildiz_0-1630524181350.png" alt="OguzSariyildiz_0-1630524181350.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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let layerList = new LayerList({
            view: view,
            container:"sideDiv",
            listItemCreatedFunction: defineActions    
        });
        var item = event.item;
          
          item.actionsSections = [
            [
              {
                title: "Go to full extent",
                className: "esri-icon-zoom-out-fixed",
                id: "full-extent"
              },
            ],
          ];

view.when(function() {  

            layerList.on("trigger-action", function(event) {
            // The layer visible in the view at the time of the trigger.
            
            // Capture the action id.
            var id = event.action.id;
            activeLayer = layerList.layer //this does not work

            
            if (id === "full-extent") {
              // If the full-extent action is triggered then navigate
              // to the full extent of the visible layer.
              view.goTo(activeLayer.fullExtent); //this either
            } 
            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 19:27:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1094596#M74512</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2021-09-01T19:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to access to the related layer with triggered action</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1094628#M74515</link>
      <description>&lt;P&gt;The LayerList doesn't have a layer property. You'll have to get the layer information from the event.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.goTo(event.item.layer.fullExtent);&lt;/LI-CODE&gt;&lt;P&gt;However, this will only work with single feature layers, not Group Layers, as in this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-actions/" target="_self"&gt;sample&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 19:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1094628#M74515</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-09-01T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to access to the related layer with triggered action</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1096373#M74599</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to access to attribute table with the event? Where can I get the properties of an event? I could not find any resource.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to implement an action that opening attribute table but can not do it&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;alert(event.item.layer.isTable)&lt;/LI-CODE&gt;&lt;P&gt;returns false&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 14:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-access-to-the-related-layer-with-triggered/m-p/1096373#M74599</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2021-09-08T14:10:38Z</dc:date>
    </item>
  </channel>
</rss>

