Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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.

Posted

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:

This topic is 5967 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.