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 an integer

Featured Replies

I'm attempting to truncate a 10 digit integer(located in a text field as text) by stripping off the last 5 numbers which are always Zeros. Ultimate goal is to make it a 5 digit integer (without the zeros).

Can someone point me in the correct direction.

Respectfully,

Eun Mi

the following Calc field will work if the five "0's" do not show up anywhere else consecutivly in the numbers.

Substitute(NUMBER FIELD NAME HERE,"00000", "")

by definition: Substitution(text, search string, replace string)

Hope this helps

jeremy

Or:

(Round(TenDigitField, -5))/100000

Lovely thing about FMP -- it's so flexible! Personally, I prefer Kurt's answer to mine, but it's nice to know you have choices.

Dan

quote:

Originally posted by Eunmi66:

I'm attempting to truncate a 10 digit integer(located in a text field as text) by stripping off the last 5 numbers which are always Zeros. Ultimate goal is to make it a 5 digit integer (without the zeros).

Left ( IntegerTextField, Length ( IntegerTextField) - 5 )

This will give you the text without the last 5 characters.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

  • Author

Jeremy, Capt, Dan

Thanks to each of you for the input. I used the Capt's script step and it worked super.

Dan, yours also worked and I took your advise and filed it for future reference.

Jeremy, The zeros sometimes appear consecutively in another location in the integer, so I was unable to use your suggestion.

Greatfully

Eun Mi

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.