Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

truncating a text field from 25-2 to 25

Featured Replies

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.

left (

text ;

position ( text ; "-" ; 1 ; 1 ) - 1

)

HTH

  • Author

thanks

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.