Domain descriptions not showing in Arcade labels

3938
6
Jump to solution
08-28-2018 09:41 AM
Zeke
by
Regular Contributor III

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.

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

To show the domain descriptions, you have to use

DomainName($feature, 'theField');

View solution in original post

6 Replies
KenBuja
MVP Esteemed Contributor

To show the domain descriptions, you have to use

DomainName($feature, 'theField');
Zeke
by
Regular Contributor III

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.

0 Kudos
KenBuja
MVP Esteemed Contributor

When I made a simple Arcade script, just double-clicking on the field name automatically added the DomainName syntax.

0 Kudos
Zeke
by
Regular Contributor III

Did not do that for me. Oh well.

0 Kudos
mrmark
by
Occasional Contributor

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. 

A man's feet should be planted in his country, but his eyes should survey the world. - G. Santayana
0 Kudos
KeithAddison1
Occasional Contributor III

What's the Python equivalent?

0 Kudos