Jump 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.

Strip the last five characters from a field name

Featured Replies

Howdy, all.

I know I'm close...maybe. I'm trying to create a calc that'll strip the last five characters off a field name, regardless of its length. So far, I've come with:

Left ( Get ( ActiveFieldName ) ; Length ( Get ( ActiveFieldName ) - 5  ) )

...but it's not working, e.g., with a field name of County__lxt the result of the calc is Co. I thought of using multiple Substitute commands but that's shaping up to being real klunky. What's the final bit that I need?

As always, thanks in advance for your help!

Try:

Left ( Get ( ActiveFieldName ) ; Length ( Get ( ActiveFieldName ) ) - 5 )

 

Remember both Length() and Get() need closing brackets BEFORE the Left() is closed.

10 hours ago, WF7A said:

I know I'm close...

Yes, you are. To expand on what LaRetta said, you are subtracting 5 from the actual field's name, instead of from its length. You are doing =

Get ( ActiveFieldName ) - 5

which in your example is evaluated as =

"County__lxt" - 5

resulting in -5. And since the length of "-5" is 2 characters, you're getting the first 2 characters of "County__lxt" as the overall result.

 

Create an account or sign in to comment

Important Information

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

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.