AnsweredAssumed Answered

Expression to label coded values with a name

Question asked by TimEatwell@gmco123 on May 12, 2019

I am trying to write a label class expression that will allow me to label polygons with a name (text code) rather than the number code in the source field. I have tried two options using a select case and elseif function, but I can't get it to work. Any help would be much appreciated.


Function FindLabel ([Type])
If '1' Then
Findlabel = 'SR'
ElseIf '2' Then
Findlabel = 'HG'
End If
End Function


or alternatively:


Function FindLabel [Type]

Select Case
Case '1' output = 'SR' 
Case '2' output = 'rg' 
Case '3' output = 'sg' 
Case Else output = [Type] 
End Select 
End Function