I have a field that has a domain. The domain description shows in the attribute table, but not in labels, where the coded value is displayed. I have the check box 'Insert fields with coded value description function' checked.
Details:
Code snip
lbl = $feature["L4STRUCTURES.structure_name"] + "\n"
lbl += "Size: " + Text($feature["L4STRUCTURES.structure_size"])
lbl += "\n" + round($feature["L4STRUCTURES.lat"], 6) + ", " + round($feature["L4STRUCTURES.long"], 6) + "\n"
ArcGIS Pro 2.2.1
L4STRUCTURES is a feature class residing on a client's ArcGIS server, and is joined to another feature class from the same source and a local table.
Any idea how to get the descriptions to display? Thanks.
Solved! Go to Solution.
To show the domain descriptions, you have to use
DomainName($feature, 'theField');
To show the domain descriptions, you have to use
DomainName($feature, 'theField');
Awesome, thank you! Not sure of the purpose of the coded values checkbox then, but this works perfectly. Surprised ESRI doesn't feature this more prominently.
When I made a simple Arcade script, just double-clicking on the field name automatically added the DomainName syntax.
Did not do that for me. Oh well.
Thank you sooooo much. Been fighting with this for a while. As with Greg, ArcGIS Pro (2.4.1) definitely did not help out in any fashion. Double clicking in Arcade just adds $feature.Fieldname
The only "help" I could find on Esri's site says you have to do Domain to Table, then do a one to many join of that table back to the table ...
Thanks again.
What's the Python equivalent?