I was wondering if it's possible to create a pop-up Arcade expression that uses the Intersects function for a feature service not in the current web map in ArcGIS Online? If so, how is that feature service accessed? I would think it would be something to do with FeatureSetById.....Any help would be appreciated!!
Solved! Go to Solution.
You can use FeatureSetByID or FeatureSetByName or FeatureSetByPortalItem
The links I include all have Esri's examples. I'd recommend FeatureSetByPortalItem, which calls the item ID in the item url. The others probably have to use $datastore... not as familiar with that way.
I usually set it to a variable first, then just include the variable in your intersect script. The tip is in the FeatureSet call, make sure to enter the layer number from the item url and to only enter in the attributes you'd like to display in that specific expression in the brackets []. [*] notates pulling all the variables. If you're trying to come up with a "new" attribute, build the expression under Attribute Expression in the popup builder. If you're looking to do a custom chart or something, use Arcade under the options of content types to add in the popup.
This blog article covers using Arcade to add information from Living Atlas layers not in your map. Similar Arcade can be applied for layers from other organizations.
You can use FeatureSetByID or FeatureSetByName or FeatureSetByPortalItem
The links I include all have Esri's examples. I'd recommend FeatureSetByPortalItem, which calls the item ID in the item url. The others probably have to use $datastore... not as familiar with that way.
I usually set it to a variable first, then just include the variable in your intersect script. The tip is in the FeatureSet call, make sure to enter the layer number from the item url and to only enter in the attributes you'd like to display in that specific expression in the brackets []. [*] notates pulling all the variables. If you're trying to come up with a "new" attribute, build the expression under Attribute Expression in the popup builder. If you're looking to do a custom chart or something, use Arcade under the options of content types to add in the popup.
This blog article covers using Arcade to add information from Living Atlas layers not in your map. Similar Arcade can be applied for layers from other organizations.