kenseye Posted July 24, 2008 Posted July 24, 2008 I have a test field and want isolate only the first characters before the -. ex: 120-1 to 120 or 30-3 to 30 this should be simple but for the life of me, I can't figure out which function to use.
Chris Cain Posted July 24, 2008 Posted July 24, 2008 left ( text ; position ( text ; "-" ; 1 ; 1 ) - 1 ) HTH
LaRetta Posted July 24, 2008 Posted July 24, 2008 Just playing a bit; many calculations will work including: LeftWords ( Substitute ( text ; "-" ; " " ) ; 1 ) ... compared to left ( text ; position ( text ; "-" ; 1 ; 1 ) - 1 ) Why am I mentioning this? Because when I was newer to FileMaker, I found Position() more difficult. And every time I found different ways of writing the same thing, it helped me understand calculations. So overall, I think Chris Cain's calculation is more versatile. If you learn how Position() works, it can be modified to pull text from ANY text string no matter the complexity (almost). My calc example is nice because it shows how you can substitute characters and THEN pull pieces of data from a field. Both techniques, if understood, can take a person (new to calculations) quite a ways in manipulting text. LaRetta :wink2:
Recommended Posts
This topic is 6315 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