Hi guys, I have to label all the cables by using all the highlighted numbers from the 'Identifer' field as screenshot. I don't want to create another filed so would like this to be done in label expression? Any fabulous suggestion?
(the number is always start in the 21st word, but ends either the 22nd or 23rd, for example, if the value is "4200-SUB-LUK014-3H1-2", then I just want to label the feature as "2"; if the value is "4200-SUB-LUK014-3H1-36", then I will want to label the feature as "36".)
Solved! Go to Solution.
Thank you Ken, I have also figure in Python, just write down if anyone needs it.
def FindLabel ([Identifier]):
s = [Identifier]
return s[20:]
Use the Split function
Function FindLabel ( [Identifier] )
dim values
values = Split( [Identifier] ,"-")
FindLabel = values(UBound(values)) 'This returns the last value. If it's always the same format, just use values(4)
End Function
Thank you Ken, I have also figure in Python, just write down if anyone needs it.
def FindLabel ([Identifier]):
s = [Identifier]
return s[20:]
You should mark your answer as correct so that others with this same question can easily find it.