June 11, 201213 yr 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
June 11, 201213 yr 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!).
June 11, 201213 yr Author 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!! 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
June 11, 201213 yr 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.
Create an account or sign in to comment