February 15, 200125 yr 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
February 15, 200125 yr 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
February 15, 200125 yr 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
February 16, 200125 yr 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 =-=-=-=-=-=-=-=-=-=-=-=-=
February 16, 200125 yr 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