2

I have a label that I need to format using label expression. The label looks like this:

EVA09C

and I want the outcome to be this:

EA09C

Can I tell the label expression to skip the V in there?

5
  • 2
    Are your labels all formatted the same way? Is the letter you want to omit always in the second position?
    – lambertj
    Commented Aug 8, 2018 at 13:51
  • 3
    Unless I am going blind what "H" are you talking about, did you mean "V" as that is the only missing character in your desired output?
    – Hornbydd
    Commented Aug 8, 2018 at 13:55
  • Answers to this question and your very similar earlier one at gis.stackexchange.com/q/291478/115 appear to be pure Python (or pure VBscript) so will have already been answered multiple times at Stack Overflow if you do not find answers here before posting them. Only the way the Python Parser uses field name/value variables is different.
    – PolyGeo
    Commented Aug 8, 2018 at 20:00
  • Thank you for your comments. It is Always want to omit the second positions as lambertj says. And sorry Hronbydd I meant "V". Thanks for pointing that out PolyGeo. Sorry for unclear question.
    – GIS_Eva
    Commented Aug 9, 2018 at 6:10
  • Please, do not forget about "What should I do when someone answers my question?"
    – Taras
    Commented Jul 6, 2021 at 7:21

3 Answers 3

4

One option would be this (replace FIELDNAME with the actual name of your field):

Replace([FIELDNAME], "V", "")

or

[FIELDNAME].replace("V", "")

if you prefer the Python parser.

0
2

Another solution that removes the second character:

def FindLabel ( [FIELDNAME] ):
    s= [FIELDNAME]
    return  s[0]+s[2:]

[Python parser]

1

Another solution

Left([FIELDNAME], 1) & Right([FIELDNAME], 4)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.