Hi,
I have created a feature class with symbology defined by a custom Arcade expression and applied the following symbology:
However, when I go to create a template of this symbology using Manage Templates --> New --> Templates for Layer it only generates the first symbol in the list:
If I select a single feature and try to generate the a single template from that feature using Template from Feature... it uses the same symbol regardless of the feature you select:
Any help appreciated.
I'm using ArcGIS Pro 2.4.1.
Thanks,
Zak
Hi Zak,
Can we please see the expression?
Thanks,
Scott
Hi Scott,
Sure. Just a warning, it's ugly (and may be why I'm having issues). Reason I went with the custom expression was I needed to symbolize unique values based on more than 3 fields. Here's the code:
var loc = DomainName($feature,"TREELOC")
var maint = DomainName($feature,"MAINTREQ1")
var monitor = DomainName($feature,"MONITOR")
var status = DomainName($feature,"ASSTAT")
if (maint == 'Tree Removal'){
if (loc == 'Street Tree'){
return 'Street Tree (To Remove)';
}
else if (loc == 'Park Tree'){
return 'Park Tree (To Remove)';
}
else if (loc == 'Track'){
return 'Track Tree (To Remove)';
}
else{
return 'Other (To Remove)';
}
}
if (maint == 'Stump grind(<0.3m)'){
return 'Stump Grind Required';
}
if (maint == 'Stump grind(>0.6m)'){
return 'Stump Grind Required';
}
if (maint == 'Stump grind(0.3-0.6m)'){
return 'Stump Grind Required';
}
if (monitor == 'Yes'){
if (loc == 'Street Tree'){
return 'Street Tree (Monitor)';
}
else if (loc == 'Park Tree'){
return 'Park Tree (Monitor)';
}
else if (loc == 'Track'){
return 'Track Tree (Monitor)';
}
else{
return 'Other (Monitor)';
}
}
if (status == 'Tree removed'){
return 'Removed';
}
if (status == 'To be planted'){
return 'To be Planted';
}
if (loc == 'Street Tree'){
return 'Street Tree';
}
else if (loc == 'Park Tree'){
return 'Park Tree';
}
else if (loc == 'Track'){
return 'Track Tree';
}
else{
return 'Other';
}
Edit: I don't get the problem if I use the Symbology panel to create my symbols, but I require more than 3 fields to base it off. So there is either a problem with my expression or templates can't be created from custom expressions (which I doubt, but haven't tested).
Regards,
Zak
Thanks Zak. It seems that you aren't the only one reporting this issue. Here is what seems like a very similar problem being reported through Esri Technical Support: [BUG-000118031 Symbology is not applied to the template while creating a new feature when the Arcade symbology is used on the layer.]
My suggestion would be to contact Support so they can verify it's the same issue and attach your case to it for tracking purposes. Here is contact info: Esri Support Contact Support
The ArcGIS Pro development team is aware of another seemingly similar issue and working on a fix for a future release. Until it's resolved, I think you should be able to manually create the feature templates that you need.
Thanks,
Scott