Select to view content in your preferred language

Is it possible to pass dataset name from variable?

2009
10
Jump to solution
07-18-2023 03:26 PM
RhettZufelt
MVP Notable Contributor

I am trying to use a variable as the dataset name in FeatureSetByName, but not having any luck.

Like so:

 

 var table = 'TestTableName'   
    
var tbl = FeatureSetByName($datastore,table, ['Year','AsBuilt'], False)   

 

But, arcade doesn't like it.  I've tried several ways with no luck.  Hoping someone here know if this is possible, and how to do it.

Thanks,

R_

0 Kudos
10 Replies
HusseinNasser2
Esri Contributor

I know this is an answered post but just adding this for additional info.  I wrote up a post to explain why.

Why FeatureSetByName doesn't work with variables

https://community.esri.com/t5/attribute-rules-blog/why-featuresetbyname-doesn-t-work-with-variables/... 

0 Kudos