This label expression below works along with a relationship class attachment linked to a line feature class. It only works great when the Domain setup for the Field "DIAMETER" does not include an inch the character. My domain for "DIAMETER" currently reads: 2,3,4&6 but it needs to be corrected to read 2",3"4" & 6". When applying the inch character(") to the domain the script errors. Can someone help me with this?
Thanks,
Larry
Function FindLabel ( [DIAMETER] , [LINETYPE] )
FindLabel = ""
if [DIAMETER] AND [LINETYPE] = "Fire Service" then
FindLabel = [DIAMETER] & "" & "FS"
end if
if [DIAMETER] AND [LINETYPE] = "Domestic" then
if FindLabel = "" then
FindLabel = [DIAMETER] & "" & "DS"
end if
end if
if [DIAMETER] AND [LINETYPE] = "Irrigation" then
if FindLabel = "" then
FindLabel = [DIAMETER] & "" & "IRR"
end if
end if
if [DIAMETER] AND [LINETYPE] = "Air Valve" then
if FindLabel = "" then
FindLabel = [DIAMETER] & "" & "AV"
end if
end if
if [DIAMETER] AND [LINETYPE] = "Sampling Station" then
if FindLabel = "" then
FindLabel = [DIAMETER] & "" & "SS"
end if
end if
End Function
I had asked something similar in maybe this will help you?