Hello all,
I am in the process of creating a dictionary for a symbolization in ArcGIS Pro. The dictionary should compose a symbol from different attribute information from different subsymbols. The database model should consist of attributes, a subtype and domains.
My problem is that I don't know how to access the field name of the subtype from Arcade. I have tried all ways (e.g. Domain(features, fieldName, subtype?), DomainCode(inputFeature, fieldName, value?, subtype?), SubtypeCode(inputFeature),...). None of them works. On a trial basis, I also tried these functions in the Expression Builder in Pro. But there it can't find $Map, $Datastore and $layer. In the screenshot you can see one option I tried. It works fine on a database schema without subtypes.
I am grateful for any help.
// Variablen für den Typ (als Nummer)
var _taktische_formation = $feature.Typ == '0';
var _fahrzeug = $feature.Typ == '1';
var _person = $feature.Typ == '2';
FeatureSet functions and globals (like $datastore etc) aren't available in the visualization profile for performance reasons. You can use SubtypeCode or SubtypeName to lookup info about the subtype from a feature. It's a bit unclear what exactly you're trying to do though beyond that.
Hello Craig,
to specify what I'm trying to do:
I have a database model where an attribute is a subtype. The other attributes have domains. Depending on which attribute information is selected in the subtype, the domains in the other attributes adapt.
I use a stylex file and the arcade script it contains to set the rules for symbolization. This works great if I don't have an attribute with subtype. But I cannot reach an attribute with subtype via the "normal" expression
$feature.Attribute
I have also tried with SubtypeName and SubtypeCode. Maybe I had a syntax error there....
Is it better understandable this way?
Thanks for your help 🙂
Hi! I’d like to highlight a practical challenge I’m facing when working with subtypes in ArcGIS Pro, particularly in the context of labeling features using Arcade.
I use a subtype field called Skotselkod, where each subtype value is associated with a short descriptive code — for example, 23 = "G2 - Bruksgräsklippning". For labeling purposes, I want to extract just the initial part of that description (e.g., "G2") to use as a concise label on the map.
However, since Arcade expressions in the labeling profile only return the numeric subtype code (e.g., 23), and not the descriptive alias, I’m unable to access the meaningful text I need. While I understand that SubtypeName($feature) exists, it unfortunately doesn’t work in the labeling profile, which limits its usefulness in this scenario.
One workaround would be to restructure the data and add a new field to store the descriptive code separately. But I’d prefer not to alter the data model just to support labeling — especially when the information already exists in the subtype definition.
This limitation also affects other use cases, such as labeling chart axes in dashboards or reports, where having access to the subtype name would greatly improve clarity and usability.
It would be incredibly helpful if SubtypeName() or a similar function could be made available in the labeling profile, just like DomainName() is in some contexts. This would allow me to build dynamic, readable labels without duplicating data or maintaining manual lookup logic in Arcade.