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:

GetDomainDescription([@Feature],'fieldname')

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

The field name is case sensitive.

To evaluate the GetDomainDescription() function, Geocortex 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 Geocortex 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.

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 field to the layout and configure the following expression:

GetDomainDescription([@Feature],'type')

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 ).

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.4