Another technique that would work is using a Python function and dictionary. This requires more initial setup but could be used anywhere you know the value(s) to be matched.
Pre-Logic Script Code:
#create function
def numberToLetter(ID):
# create dictionary {'string':'string', number:'string', etc.}
LookUpDictionary = {1:'A', 2:'B', 3:'C', 4:'D'}
# process ID in dictionary. "Not Found' is used for undefined
return LookUpDictionary.get(ID,'Not Found')
Calculated Field:
numberToLetter(!ID!)
--
Thanks,
Eric Smith
GIS Analyst
Fitzgerald & Halliday, Inc.
-------------------------------------------------------------------------
This list (CTGIS-L) is an unmoderated discussion list for all CT GIS
Users.
If you no longer wish to receive e-mail from this list, you can remove
yourself by going to http://listserv.uconn.edu/ctgis-l.html
|