Select to view content in your preferred language

Trying to Use a Calculated expression to display Domain description

406
1
10-10-2023 02:28 PM
tvelez
by
New Contributor

I am trying to create a calculated expression that will return a numeric value from one field in the feature class with a description from a coded value domain in another field in the same feature class. The goal is to concatenate the two fields to give a unit number and description/characterization that can be used for map labels. I think that I need to use the "DomainName" function, but I have not been able to make it work. The numeric field is called "Unit_Number" and the field with the coded value domain is called "Stream_Habitat". I am able to return the numeric value along with the coded value, but I want to return the description, not the coded value. I think if I was able to see examples of the DomainName function, I could figure it out, but the help post on ESRI has syntax only.

Here is my functioning code block that returns numeric value and coded value:

Concatenate([text($feature.Unit_Number), $feature.Stream_Habitat], ' ')
0 Kudos
1 Reply
KenBuja
MVP Esteemed Contributor

This is how you return the descriptive name

Concatenate([text($feature.Unit_Number), DomainName($feature, 'Stream_Habitat')], ' ')

 

0 Kudos