July 24, 200817 yr 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.
July 24, 200817 yr 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:
Create an account or sign in to comment