curious99 Posted March 9, 2004 Posted March 9, 2004 Hi all I have this text field into which I store phone numbers. Entries usually look like this : 751-862-7845. I'm looking for a way to only keep numbers, so the field would now look like this 7518627845...is there a way to do this? thanks in advance :-) Luc Version: v6.x Platform: Windows XP
Lee Smith Posted March 9, 2004 Posted March 9, 2004 Hi Luc, I can think of a couple of ways to do this depending on what you want the permanent data to be. You could strip the field using a loop script and the Replace Script Step with the Calculation of Substitute(YourPhoneField, "-", "") - This removes the "-" permanently. Or You could create a second field and make it a calculation using the Substitute calculation above - this preserves the original field. HTH Lee
Ugo DI LUCA Posted March 9, 2004 Posted March 9, 2004 Hi Luc, May be : SetField[PhoneNumber,Substitute(Substitute(Substitute(Substitute(PhoneNumber,"(";"";")";"";"-",""," ","")]
Ocean West Posted March 9, 2004 Posted March 9, 2004 Check out the new "Filter Function" in FileMaker 7
curious99 Posted March 11, 2004 Author Posted March 11, 2004 thanks guys waow...I did not know 7 was out...I'll download the trial version(french will most probably come out later though...what a drag! wink). I'll try your suggestions and let you know the result. Being a text field, I have other words sometimes included in there besides "-"...will that cause a problem in the substitute function that you suggested? have a great day and thanks again for your input. Luc
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now