# Truncating an integer

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

## Recommended Posts

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

##### Share on other sites

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

##### Share on other sites

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

##### Share on other sites

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

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

##### Share on other sites

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

##### Share on other sites

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

## Create an account

Register a new account

• ### Similar Content

• #### Filemaker 6 for Mac issue.

By Tumma K,

• (and 4 more)

Tagged with:

• 8 replies
• 4,479 views
• #### FM3 upgrade to FM Pro 5.5 - Windows 8 installation possible?

By MrEddByrnes,

• (and 4 more)

Tagged with:

• 5,264 views
• #### Moving data from fp5 to fp13

By bmill,

• (and 4 more)

Tagged with:

• 2 replies
• 3,497 views
• #### Filemaker 5.5 database will not delete records on-line

By randyinla,

• (and 4 more)

Tagged with:

• 3,113 views
• #### Are there still hosting providers for filemaker 5.5?

By randyinla,

• (and 4 more)

Tagged with:

• 2 replies
• 2,739 views
×
×
• Create New...