3

I currently have a field that has text for a hyperlink to a photo that I am trying to shorten. I only need the name of the file at the end but the length of the name varies by a few characters. The path before the name is always 59 characters. I have been trying to use "Right( [Overall_Ph], Len( [Overall_Ph]), -59 )" in the field calculator to remove the first 59 characters but it is returning an error.

  • Looks like you simply have an extraneous comma just before -59, in other words you want len minus 59 char – T. Wayne Whitley Apr 7 '17 at 15:19
5

Switch your Field Calculator parser to "Python" and try this:

!Overall_Ph![59:]

This will output the rest of the field value, starting after the 59th character (Python indexes start at 0)

Alternatively, if you wish to stick with VBScript Parser (I would recommend starting to use the Python parser) use the mid() function instead of right()

mid([Overall_ph], 60)

Which will function in the same way as the Python one - output the value starting at the 60th character.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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