ArcGIS Pro – Using Arcade to Label with Coded Values in ArcGIS Pro

arcadearcgis-prodomains

I am trying to label features that have coded domains in ArcGIS Pro. In ArcMap the procedure is to use the coded domains in an expression as shown below, but you have to enable the codes using the checkbox; as shown in the snippet below. In ArcGIS Pro this is Arcade driven and we are having issues coming up with a correct expression to achieve this.

How would I do this using Arcade in ArcGIS Pro?

enter image description here

Best Answer

If you are labelling a feature which has a Domain on the field then this appears to be automatic in ArcGIS Pro, you see the description not the code. The function is DomainName() and has the syntax DomainName($feature, 'grade') where the second parameter is the field name. To see the actual code value I would reduce the expression to $feature.grade.

Related Question