Show Coded Value Domain Descriptions

If you include a field with coded values in a report, the report shows the codes. To show the descriptions instead of the codes, use the GetDomainDescription() function:


Replace fieldname with the name of the coded value domain field.

The field name is case sensitive.

To evaluate the GetDomainDescription() function, VertiGIS Studio Reporting queries ArcGIS for the field information that the function will operate on. The [@Feature] column contains the source feature information returned by the ArcGIS query.

If VertiGIS Studio Reporting cannot find the description, the field's value is returned. For example, the field's value is returned if fieldname does not have coded values.

The tutorial in Calculate Summaries in Charts uses a coded value domain field in a chart. The Step 4: Show domain descriptions in the legend describes how to use a calculated field to show domain descriptions in a chart.

Example - Coded Value Domains

Suppose a report's data layer has a field called type with the following coded values:

0: Type I - Truck Chassis
1: Type II - Van Chassis

If you include the type field in a report ([type]), the report will show the codes—0  or  1.

To show the description in the report, add a Label control to the layout and configure the following expression:


Expression to show a coded value domain field's description in a report

The report layout below has controls for the type field's code () and description (). The generated report is shown in ).