March 9, 200421 yr 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
March 9, 200421 yr 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
March 9, 200421 yr Hi Luc, May be : SetField[PhoneNumber,Substitute(Substitute(Substitute(Substitute(PhoneNumber,"(";"";")";"";"-",""," ","")]
March 11, 200421 yr Author 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
Create an account or sign in to comment