Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4605 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all,

new to the forum and to filemaker, i have quite a bit of knowledge of ms access but new to filemaker, building my first database so just after some advise please

i have a field (Text) which will contain barcode information the problem is the data i need in encased in the text, i need to remove the first 4 charters and the last 2 in access i used Left([Product],Len([Product],2) but not shire how i can do is in filemaker being so new

any direct on how to active it would be fantastic many thanks in advance

James

Posted

Define your field as calculation, type text, with

Middle ( Product ; 5 ; Length ( Product ) - 6 ).

This starts at the 5th character and goes to the third before last, effectively lopping off the first 4 and last 2 characters.

Alternatively, you can do two simultaneous substitutions:

Substitute ( Product ; [ Left ( Product ; 4 ) ; "" ] ; [ Right ( Product ; 2 ) ; "" ] ).

EDIT: …only if you're sure “the two sub-strings do not appear elsewhere in the string” (thanks Comment!).

  • Like 1
Posted

I used the Substitue one you advised and it was just what i was after, many thanks you obviously know filemaker well, coming from an access background is hampering me

Doh!!

:yep:

once again thank you for taking the time to help me out i will look up the substitute function and this will come in very handy

Posted

I used the Substitue one you advised

You should have picked the Middle() one instead - because the Substitute() one makes an unwarranted assumption that the two sub-strings do not appear elsewhere in the string.

This topic is 4605 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.