I am working on a web map that takes values in one layer and divides by values in a table to display percentages. I used FeatureSetByName to make this calculation for the popups. However, I want to be able to display this in the symbology and/or labels for the layer as well. It doesn't look like there are feature set capabilities in the symbology expressions so I am unable to copy and reuse the code there. However, is there a good work-around for this? Do the values created from the expression in the popup get stored anywhere else for use in other places other than popups?
Thanks for any help!
Solved! Go to Solution.
Due to the limitations in Portal, I found a work-around by going back to ArcGIS Pro and used FeatureSetByName with $datastore to calculate a field that took values in one layer and divided by values in a table. Publishing this back to portal enabled me to both label by this new field and apply it symbology.
The short answer is "no". Arcade has a number of different profiles, each with different capabilities and limitations.
The calculated values are not stored anywhere, except perhaps in your browser's local memory, and the expression only evaluates when the feature is clicked to retrieve the popup information. Short of using Field Calculate and a new field, there's no way to accomplish what you're asking for via Arcade, unfortunately.
Is that why I can't actually 'set' a value in another field inside of a webmap using this?
Due to the limitations in Portal, I found a work-around by going back to ArcGIS Pro and used FeatureSetByName with $datastore to calculate a field that took values in one layer and divided by values in a table. Publishing this back to portal enabled me to both label by this new field and apply it symbology.