简体   繁体   中英

Calculating Subtypes and Coded Values in ArcGIS Attribute Table

I am working in an ArcGIS attribute table (basically an Access Table) and I have set up some subtypes for a short integer field. The subtypes give a coded for each value and an associated descriptive value for the code. See the following:

Code     Description

0        Low
1        Medium
2        High

I populate one of the coded values for each record in that field, so that each cell has either Low, Medium or High. Not the actual coded value of 0,1,2.

I want to field calculate a second field of type TEXT based a concatenation using this subtype field in conjunction with 2 other Text field. The concatenation works, except it returns the code for each record as opposed to the descriptive value. I would like the descriptive value. Does anyone know how to have the field calculator return this?

Thanks, Mike

This is a field calculate using a VB Script parser, and showing the codeblock option.

Pre-Logic Script Code:

Dim ValueToConvert
Dim ConvertedValue

ValueToConvert = [YourSubtypeField]

Select Case ValueToConvert
Case "0"
   ConvertedValue = "Low"
Case "1"
   ConvertedValue = "Medium"
Case "2"
   ConvertedValue = "High"
End Select

Output = [YourFirstFieldToConcat] & " " & ConvertedValue & " " & [YourSecondFieldToConcat]

CommonName =

Output

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM