AnsweredAssumed Answered

Updating a Feature Table on Feature Layer Change

Question asked by NMWRRI on May 20, 2016
Latest reply on Oct 21, 2016 by CGSJohnson

Hi all,


I've using the example of Feature Table from ESRI. However, I'm trying to update the table based on the feature layer that is visible. I'm trying to create a variable that is showing the visible layer and link that variable to the feature table. What is the property to get the current layer being displayed? Would I also have to create a table for each layer? All my layers have the same field names.


Many Thanks for all your help!!




var layer = function changetable () {
     if (CNTYmm.visible || HUC8mm.visible || WPRmm.visible)
          {get actual layer being displayed}
     else (CNTYin.visible || HUC8in.visible || WPRin.visible)
               {get actual layer being displayed}};

my FeatureTable = new FeatureTable({
     "featureLayer": layer,
     "outFields": ["NAME", "Units"],
     "map" : map}, 'TestTable');