FeatureSetByName in Dashboard indicator data expressions

12-22-2021 02:58 PM
New Contributor

[Disclaimer: I'm relatively new to Arcade and Data Expressions]

I am trying to use the function FeatureSetByName in a series of data expressions configured in AGOL Dashboard indicators. Originally I was using FeatureSetByPortalID, which pulls in my feature sets from the portal using the ID specified in the arguments. However, my feature sets will change based on data updates, so I am now trying to use FeatureSetByName so it can continue to reference the feature sets even if it gets recreated (the name of the feature set will remain constant). This is necessary as my data expressions use data from multiple tables to run performance analyses (which are presented in the Dashboard indicators). As the joined tables will have different IDs every time their created, I am trying to have the data expression read in the joined layers/tables by just referencing the name rather than an ID so it's dynamic and the user doesn't need to manually update the IDs in the data expressions. Below is the existing code using FeatureSetByPortalItem:


var portal = Portal('https://[site]')
var runwayFS = Filter(FeatureSetByPortalItem(portal,
'[ID]', 0),"PrimaryRwy='Y'");


As I'm looking at the syntax for FeatureSetByName, I am not sure what the first argument would be. Looking at the references online, they suggested $map and $datastore, but I am not seeing these globals. As I see that FeatureSetByName is an available function in my data expression, I know it's possible to use. However, I'm not sure how it can read in my joined layers/tables. These joined layers/tables are in my content with open access, and I was able to get them read into my data expressions using FeatureSetByPortalID. But I'd like to use FeatureSetByName. Anyone know how to use this function in a Dashboard indicator data expression? Below is a screenshot showing the arcade code with FeatureSetByName (which I'd like to configure in for the dynamic nature of my Notebook to work). What should the first argument of the expression be? See below for exactly where I'm getting stuck at:


var portal = Portal('https://[]')
var runwayFS = Filter(FeatureSetByName(['unsure what to put here'],



0 Replies