Jimbojames30 Posted June 11, 2012 Posted June 11, 2012 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
eos Posted June 11, 2012 Posted June 11, 2012 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!). 1
Jimbojames30 Posted June 11, 2012 Author Posted June 11, 2012 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
comment Posted June 11, 2012 Posted June 11, 2012 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now